Jogging left fails, moves to center and resets origin to center instead

I successfully used LB 1.7.x on Linux but I frequently switch to CNC. Now I want to run another batch of laser jobs but fail to position the laser in the lower left corner. Homing works, moving right/up/down works. When clicking on the left arrow the laser moves not the expected amount left but instead to about the center of the workspace. From there, moving left is not possible as it assumes this position to be the leftmost edge of the space. When moving right from this center point I can also jog left (up to the middle). I can repeat homing and the same issue happens again.
I guess that the CNC machine (Genmitsu3030prover max) got some settings which are not good for laser mode, but I can’t figure it out and I don’t understand why only moving left makes a problem. I tried 1.7.08 down to 1.7.04 with no difference.
I tried to remove the .local/share/Lightburn folder to get rid of some old settings, but it seems that the settings are stored elsewhere - I didn’t find the location yet (It remembers my macros (such as switching back to laser mode), the machine and everything).
Any suggestions what’s going wrong and how to recover it?

Did you enable the CNC setting in device settings? (Was it there in 1.7 already?)

Yes, the “CNC Machine” option is available in version 1.7.

These docs for version 1.7.08 help setting up a CNC GRBL Configuration - LightBurn Documentation

You’ll find the settings location by going to “File > Preferences > Open Prefs Folder”. You can restore the settings to defaults by deleting the files prefs.ini and prefs.ini.old

Have you used your machine for a CNC job and forgot to reset the G54 workpiece coordinate offset?

What’s the output of $# in the console?

Do you mean the switch for negative coordinate system? Yes, this exists and is off. I think it has been off all the time (and I hope it doesn’t change with firmware settings). The origin radio button is set to the lower left. If the laser spot is on the lower left corner of the work table, it is at x=y=0, same for CNC operation. Readback of coordinates in LB never returned meaningful values to me. I don’t know if LB uses absolute or relative coordinate systems (can I log all of its commands to the machine?).
The other jogging moves are all ok. As far as I can tell only the left move is broken. Is it possible by chance that I accidentially defined a hotkey which broke it? I click the buttons with the mouse, though :-/

I have 300x300mm work space. After homing, the laser is supposed to be at 0,0,0 in the lower left top corner, isn’t it? A “get position” returns -154.60,-179.00, 55.63 (I never got 0,0,0 in LB).
After moving 10mm each down, right, up it returns -144.60,-169.00, 45.63 which is at least the correct relative change. Then, trying to move 10mm left, the laser moves in x and stops where it thinks it is at 0, get position now returns 0.00,-169.00, 45.63.
It doesn’t compute to me. I can also jog just 1mm back left, it always moves to this strange zero position.

$#
[G54:154.600,179.000,-55.635,0.000]
[G55:0.000,0.000,0.000,0.000]
[G56:0.000,0.000,0.000,0.000]
[G57:0.000,0.000,0.000,0.000]
[G58:0.000,0.000,0.000,0.000]
[G59:0.000,0.000,0.000,0.000]
[G28:0.000,0.000,0.000,0.000]
[G30:0.000,0.000,0.000,0.000]
[G92:0.000,0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000,0.000:0]
ok
$$
$0=10 (step pulse,usec)
$1=255 (step idle delay,msec)
$2=0 (stepport invert mask)
$3=3 (dirport invert mask)
$4=0 (stepenable invert,bool)
$5=1 (lims pin invert,bool)
$6=1 (probe pin invert,bool)
$10=3 (status report mask)
$11=0.010 (junction deviation)
$12=0.002 (arc tolerance,mm)
$13=0 (report inches,bool)
$20=1 (soft limits,bool)
$21=1 (hard limits,bool)
$22=1 (home cycle,bool)
$23=3 (homing dir invert mask)
$24=100.000 (homing feed,mm/min)
$25=500.000 (homing seek,mm/min)
$26=250 (homing debounce,msec)
$27=1.000 (homing pull-off,mm)
$30=1000 (maximum spindle speed,rpm)
$31=0 (minimum spindle speed,rpm)
$32=1 (laser mode enable,bool)
$100=800.000 (X axis pulse:step/mm)
$101=800.000 (Y axis pulse:step/mm)
$102=800.000 (Z axis pulse:step/mm)
$103=177.777 (A axis pulse:step/mm)
$110=2000.000 (X axis max rata:mm/min)
$111=2000.000 (Y axis max rata:mm/min)
$112=2000.000 (Z axis max rata:mm/min)
$113=1000.000 (A axis max rata:mm/min)
$120=20.000 (X axis acceleration:mm/s^2)
$121=20.000 (Y axis acceleration:mm/s^2)
$122=20.000 (Z axis acceleration:mm/s^2)
$123=20.000 (A axis acceleration:mm/s^2)
$130=300.000 (X aixs max travel:mm)
$131=300.000 (Y aixs max travel:mm)
$132=80.000 (Z aixs max travel:mm)
$133=9999.000 (A aixs max travel:mm)
ok

Thanks for the hint about G54!
G10L20 P1 X0 Y0 Z0
solved this problem, though I still don’t really understand it :smiley:

1 Like

Basically LightBurn 1.7 and before always use the G54 workpiece coordinate offset as a reference point.

If G54 is not 0,0 (and for some machines it wasn’t), then that was the origin for LightBurn.

That would’ve explained the constant offsetting issue you had on your machine bed.

I think at this point I’m going to try and record a short video to explain what the offsets mean and how to use them (or not). :laughing:

1 Like

Be sure to include that G10 sets the G54 values. I just learned this recently. :nerd_face:

It did not on the big CNC’s I used to service.

1 Like

it turned out that I had the G10 command already in my “switch to laser” macro but it had a typo. I think this kind of initialization sequence would be a good step to run when starting LB. enable laser, clear offsets, assure the proper coordinate space etc. Probably some of them are done but it happens unnoticed?
For reference, this is my current macro to initialize the laser mode:
$32=1; $30=1000; G54; G92.1; G10 L20 P1 X0 Y0 Z0;

And a side note to keep the angle axis off if the machine has 4 axis … I was a bit surprised to see elliptic shapes despite a perfect calibration :sweat_smile: Would be great if LB supports a 4th hardware axis as well :upside_down_face:

1 Like

Glad you figured it out. For anyone else doing this, be aware not all controllers support the “;” between commands. Separate lines may be needed.