Help with Quick Action for Laser Alignment

I’m just getting myself all sorts of confused.

I created a little 60’vbit cross hair at 0,0 and aligned my laser crosshair to it.

The offset is X3.585 Y-0.629

If I make a quick action:
G91 G01 X3.585 Y-0.629 F500;
G90;

and use it at 0,0 (which is for an example purpose) it moves me to
X0.141
Y-0.025

If I make a return to laser action by inverting the numbers and go back to 0,0 and run it I get:
X-0.141
Y0.025

So it’s moving, and inverting properly, but the units of measure are off?

Now I’m used to metric for a lot of machines but since CNC seems to be more imperial I go with the flow and have set things up as imperial but when I check $$, $13=0 not 1 which is imperial (and this is with Motion set to imperial which it states in the position (inch.)

I’m just a little confused on how this should be rigged, or what I’m missing, or is this some edge bug that I am wandering through?

Likely it is the offset from the tip of the router bit to the position of the laser beam. When you made the X that was not the same place the laser was shining.

I’d hazard that the tip of a vbit is about as at a zero point as I’ll get but that doesn’t explain the core issue which is why is an input giving a vastly different output. If I move 3.585 and it’s moving 0.141 that’s… weird.

Did some digging into G20 and G21 and see that even though we have a lot of imperial units being used the machine or Motions passthrough still sees things as metric. So… one small progress was:

G91;
G20 X3.585 Y-0.629 F500;
G90;

Started moving, but it’s all relative to 0,0 almost like it’s a G90 command not G91 because if I flip the G20 to -3.585 it goes to -3.585 not back to 0.

So now I need to see why an incremental move is moving like an absolute.

ah… so I loaded up gSender, home, and jog my crosshair to the center of the vbit-engraved-cross and then used G91 G20 X-3.585 Y0.629 F500; and it puts the spindle in position. I invert it and it goes back to the laser crosshair.

So… it does work… well… lets try one more thing now that we can tie this together…“sending directly to grbl” which is honestly what you’d think would be happening natively in the script… but no…

reset, rehome, jog laser back to crosshair 0,0…

Laser to Spindle Action
/G91 G20 X-3.585 Y0.629 F500;
/G90;

Spindle to Laser
/G91 G20 X3.585 Y-0.629 F500;
/G90;

If you do not escape the G90 as well it will cause a lot of bizarre behavior that will lead you to not knowing why the machine is not responsive.

So-- I’m glad to have figured this out, but I think this could use some development/ui/ux scrutiny because it’s not ideal to navigate or debug.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.