Work Offset Issue?

400x400 bed, grbl 1.1h, MKS_DLC32
I home to Bottom Right.

I have a home macro which works great. Some of it is redundant since it holds in eprom but better safe than sorry.

  • Home
  • Speeds
  • Work Area redefine
  • Reports, laser, & position

Now… moving around via Set Laser Position, works great.

but… If I jog by keypad…

or if I jog by UX…

It flips to negatives.

To recap–

  • Home in bottom right (-400,0)
  • Redefine Work area
  • Works and stays proper numerically if driven by Set Laser
  • Work area goes back negative if driven by display buttons (left/right/X)
  • Work area goes negative and always drives left/X if driven by keypad

Thoughts on what I’m missing or any other datapoint you want to see for help in diagnosing? I’ve been watching/reading/looking through grbl commands but I can’t lock on to why it handles the jogging differently. Hoping it’s just a gross oversight. :smiley:

Thanks for the considerations.

Are you often changing these settings outside of this context? If so, really there’s no reason to do this and a small number of reasons not to.

Can you provide the following:

  1. Confirm if your jogging controls work as expected. Left goes left, right goes right, up goes up, down goes down
  2. Full screenshot of LightBurn
  3. Run these commands in Console and return output:
$H
$I
$#
?

to the commentary, no I’m not changing them out, early readings here said they were changed boot to boot and to have them in a macro. Later readings and observations show that they do stick to eeprom so I really just need to prune back the stuff that isn’t changing. I just haven’t refactored yet.

  1. Jogging by numpad does not work as expected. It always jumps to X0 (left), Y works fine.
    1b. Jogging via software makes X numbers negative again as screenshotted above. Y also works fine.
  2. –attached
  3. – below
$H
ok
$I
[V4.00(8M.H35.20230529)]
[VER:1.1h.2023052903:]
[OPT:VMPH,63,256]
Target buffer size found
[MSG:Using machine:MKS DLC32]
ok
[MSG:Mode=AP:SSDI=MKS_DLC29776:IP=192.168.4.1:MAC=54-43-B2-8F-50-75]
ok
$#
[G54:-400.000,0.000,0.000]
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]
ok
?
<Idle|MPos:0.000,0.000,0.000|WPos:0.000,0.000,0.000|FS:0,0|Pn:P|DISCON>
ok

In that case you can literally do without the macro. No refactoring necessary. Use the home button in Laser and Move windows to trigger a homing operation.

Excluding effects to the values, do the jogging controls work in the direction expected?

The Console output is somehow missing the output of the ? command. Can you rerun those commands one at a time and then make sure that ? returns output. Then return all results please.

I can see from the screenshot that your report structure is slightly odd which may be the cause of your issue but I’d like to see it more closely.

Can you also run this command and return output?

$$

Also, it looks like you intend for the origin to be located at bottom-left. Is that specifically how you want to operate? For example, in contrast to origin at bottom-right where you’re homing.

If I don’t set the work offset after homing, set laser position will not operate it’ll run into the limit switch.

$H
ok
$I
$I
[V4.00(8M.H35.20230529)]
[VER:1.1h.2023052903:]
[OPT:VMPH,63,256]
Target buffer size found
[MSG:Using machine:MKS DLC32]
ok
[MSG:Mode=AP:SSDI=MKS_DLC29776:IP=192.168.4.1:MAC=54-43-B2-8F-50-75]
ok
$#
$#
[G54:-400.000,0.000,0.000]
[G55:0.000,0.000,0.000]
[G56:0.000,0.000,0.000]
[G57:0.000,0.000,0.000]
[G58:0.000,0.000,0.000]
[G59:0.000,0.000,0.000]
[G28:0.000,0.000,0.000]
[G30:0.000,0.000,0.000]
[G92:0.000,0.000,0.000]
[TLO:0.000]
[PRB:0.000,0.000,0.000:0]
ok
$?
$?
<Idle|MPos:0.000,0.000,0.000|WPos:0.000,0.000,0.000|FS:0,0|Pn:P|DISCON>
[HLP:$$ $+ $# $S $L $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H $F $E=err ~ ! ? ctrl-x]
ok

–if I try to use set position from here…

Starting stream
G21 G54
G90
G1  X193 Y231 F6000 S0
G90
M2
[MSG:Program End]
ALARM:1
Hard limit triggered. Machine position is likely lost due to sudden and immediate halt. Re-homing is highly recommended.
On or near line 5:
Stream completed in 0:00
Grbl 1.1h ['$' for help]

If I just home and then use the two different jog styles, they still react the same way. numpad leads to large X to proper 0 but can never be moved off zero, Y is fine.

If you use the jog buttons first, even in their quirky state, and then you use set pointer to location, that is fine again as well.

I first thought LB wasn’t getting positional information and so had the ?I ? but in the end all it needed was to be reminded of the offset. Even though you can see the offset holding from home to home.

Forgot $$

$$
$54=12345678
$53=MKS_DLC
$52=12345678
$51=MKS_DLC
$0=10
$1=25
$2=0
$3=7
$4=0
$5=1
$6=0
$10=0
$11=0.010
$12=0.002
$13=0
$20=0
$21=1
$22=1
$23=2
$24=75.000
$25=7000.000
$26=250.000
$27=1.000
$28=1000.000
$30=1000.000
$31=0.000
$32=1
$41=1
$47=1
$46=1
$102=100
$101=80
$45=0
$44=0
$43=0
$42=0
$50=1
$40=1
$100=80.000
$103=100.000
$104=100.000
$105=100.000
$110=25000.000
$111=18000.000
$112=6000.000
$113=1000.000
$114=1000.000
$115=1000.000
$120=1000.000
$121=300.000
$122=500.000
$123=200.000
$124=200.000
$125=200.000
$130=400.000
$131=400.000
$132=50.000
$133=300.000
$134=300.000
$135=300.000
ok

Missed this… I’ve got my X switch on right, Y on bottom-right, I don’t care where it thinks home is, as long as it responds correctly. I was just piecing together from past experiences and trying to figure out how to make it behave under the circumstances of a bottom-right switch orientation. If there is a better way I am all for it.

That’s instructive. But not yet sure what that means. I can clearly see the offset defined so that may be something else going on.

Note that it looks like you entered $? rather than ?. I just need `?’

Please just copy and paste one line at a time into Console:

$H
?

Please return output.

What do you mean by “set position”? Is this using the pin icon in the Tools toolbar?

I’m having a very hard time following you here. I’m trying to understand if the laser head moves left when you push left. And does it move right when you push right.

“Fine” doesn’t explain to me what’s actually happening. It tells me how you’re evaluating it. Can describe in terms of action and reaction?

Not necessarily better or worse. Just preference. Most GRBL laser machines are designed to work bottom-left origin but it’s not a requirement even with homing at other locations. If you want to stick to convention then bottom-left is conventional.

$H
ok
?
<Idle|MPos:0.000,0.000,0.000|WPos:0.000,0.000,0.000|FS:0,0|Pn:P|DISCON>
ok

Yes, Set Position, the pin icon on the toolbar. It’s how I drive since jogging is…fubar’d at the moment.

If I use the numpad–

  • left: laser head goes all the way left, and stops at what would be in conventional terms X0, that’s it. One time one go.
  • right: doesn’t do anything. It will never leave X0 numpad
  • up: will go all the way to X0 then up one increment. Further presses just go down as intended.
  • down: will go all the way to X0 then down in one increment. Further presses just go down as intended.

If I use the jog keys in the application it will go left and right, up and down, but the numbers in the position X position box become negative again.

#1 I use my simplified home macro and then use Set Position to move the print head to a location on the bed. Note the position.

#2 I use the Jog pad on the display and my origin in the application has moved to bottom-left, 0,0. My Position on Display has gone X-218

#2 alternate, If we go back to #1 and then I use the numpad on my keyboard the laser head goes all the way to the left physically, and now the Position on display is X0

Fine in the context it was given is saying the Set Position button works as intended. In each of these failed attempts at jogging as long as I haven’t hit a hard limit I can bring Set Position back to my chosen position without needing to re-home.

As an aside, before I installed limit switches and made the machine location aware, jog on button and keypad worked as intended.

Trying to not be obtuse, thanks for whittling on me. I could just about build a full use case how many ways I’ve tested this. :smiley: I just want to jog properly xD

These value are not what I would expect. But reflects what you stated that you lose the offset if you home without specifying the offset.

Do you have gcode anywhere else that’s potentially negating the offset?

Thanks for clarifying this. The behavior you’re describing is fairly unusual but makes sense now in full context.

From what I’m seeing the fundamental problem is in some odd behavior with the firmware. What’s the source of the firmware? I tried looking up the version and I couldn’t find this on MKS’s public github page.

While what you’re doing should work It seems to me you’re fighting against the board’s inability to hold an offset. I think the fact that machine position and work position are both being reported may be confusing LightBurn as well but can’t tell for certain.

I suggest you shift strategies and make home position your origin. This way you won’t have to fight against how the machine is setting origin at home.

Try these changes:

$RST=#
$3=6
$23=3
$10=1

$RST=# will remove any work offset
$3=6 will invert direction of X
$23=3 will invert homing direction of X to accommodate change in X
$10=1 will have controller report machine position

Then, in LightBurn, go to Edit->Device Settings and change Origin position to bottom-right.

Then try homing the laser using home button in Laser window or Move window. Then use jogging controls in Move window to test movement. Do they move in the direction as intended?

If so, check position values. Values should increment as you go up and left.

1 Like

If there’s strange gcode it’s not on my doing. I stripped that macro down to just the offset.

However your work around is a good one. I flipped it all around, rehomed with the home button, Set Position tool worked, numpad–worked, jog UI–worked.

I’m running the new Phecda/Elegoo and I’m not sure how they are cooking their grbl as I’ve yet to really explore it or compile my own. My spare tinker time has dwindled. :smiley:

Regardless, I have a working solution. I’ll test it out more after some sleep but on first blush we have proper machine and work space functionality again. Huzzah! Many thanks for your time and energy.

I had not heard of this model or that Elegoo were making laser engravers. Interesting. They must have customized the firmware in some way not currently obvious.

Anyway, glad you are up and running. Let us know how you carry on.

1 Like

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