Hello Guest it is April 24, 2024, 12:21:19 AM

Author Topic: Laser offset relative to Router spindle  (Read 772 times)

0 Members and 1 Guest are viewing this topic.

Offline MXJ

*
  •  19 19
    • View Profile
Laser offset relative to Router spindle
« on: December 21, 2021, 11:49:43 PM »
Hi Guys,

I have added a Laser to my CNC router and its sit to the left of the router. Next is to measure the exact offset between laser and router, then to correct for this offset. This is fiddly but can be done and will require some twigging.
In the meantime, I would like to assign one of the spare buttons in MACH4 screen, to offset the laser head relative to the router spindle. This will enable me to use the router to route something and then by applying the offset do laser engraving to the routed material.

This is what I have come up with so far

function LaserOffset()
   GoToWorkZero()
   mc.mcCntlSetLastError(inst,"Setting Laser Position Relative To Router")
   mc.mcCntlGcodeExecute(inst,"G54 G0 X25.203 \n G0 Y12.375")
   end
This function hopefully will move the CNC machine to position X25.203 and Y12.375, relative to the workpiece so that the laser head is now set over the workpiece Zero.
However, I don’t want the machine to first move to the workpiece Zero position, I want to be able to use the X and Y values from the workpiece Zero position, and move the machine to X25.203 and Y12.375, from this Zero position.

So, if the workpiece Zero is at X10 and Y10, by pressing the laser offset button, I want the machine to move to X35.203 and Y22.375.  This is then the new workpiece Zero, and must replace to old value of X10 and Y10.
I would greatly appreciate help with this problem

Best Regards

Max

Offline MXJ

*
  •  19 19
    • View Profile
Re: Laser offset relative to Router spindle
« Reply #1 on: December 23, 2021, 12:07:51 AM »
I just saw this VERY valuable video, and I think it will answer a lot of my questions
Mach4 Screen Editing & new screen features for CNC laser support including laser touch plate support
Re: Laser offset relative to Router spindle
« Reply #2 on: December 23, 2021, 05:57:08 AM »
I just saw this VERY valuable video, and I think it will answer a lot of my questions
Mach4 Screen Editing & new screen features for CNC laser support including laser touch plate support

I for tool offset i use G10 L20 P0 X* Y*, maybe will help you that too.
Re: Laser offset relative to Router spindle
« Reply #3 on: December 23, 2021, 08:35:33 AM »
I'm sure you are aware of it but remember that the laser must be in perfect alignment with the spindle.  If not, as the spindle is raised or lowered the laser will locate at a different offset.  Obviously an easy test.  Mark the spot with the laser at one height and then raise a couple of inches and see if the mark moves.

HTH

RT