- Posts: 52
- Thank you received: 0
How to reset 5221, 5222 and 5223 parameters (G54)?
I save my coordinates G54 with:
G54 G10 L20 P1 x0 M100
G54 G10 L20 P1 y0 M100
G54 G10 L20 P1 z0 M100
These remain saved in linuxcnc.var and often I have to delete it.
What is the best way to reset these coordinates? I have problems especially when I use touch off with the z axis.
Thanks, Nicola.
Please Log in to join the conversation.
Why have a G54 at the start? (and why repeat it)
G10 L20 P1 X0 Y0 Z0
Is valid G-code too.
Please Log in to join the conversation.
I use 3 separate lines because I have 3 separate buttons (x, y, z) in my gui.
Nicola.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Like Andy was trying to say The P after the G10 L2 (L20) command specifies the work coordinate system, and unless you specify P0 the current one selected is irrelevant so setting it before hand is not needed.
Please Log in to join the conversation.
Uh, you're right, I've read the documentation better.Todd Zuercher wrote: G10 L2 P1 X0 Y0 Z0 will reset the G54 offsets for XYZ back to 0.
OK! I got it.Todd Zuercher wrote: Like Andy was trying to say The P after the G10 L2 (L20) command specifies the work coordinate system, and unless you specify P0 the current one selected is irrelevant so setting it before hand is not needed.
With P0 I reset the current coordinates, while with the other numbers (P1, P2, ...) I reset the others (G54, G55, ...).
Another question: what is the difference between G10 L2 and G10 L20? The documentation says:
Thanks.
Nicola.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Please Log in to join the conversation.
I think you meant writing L2 and L20.Todd Zuercher wrote: G2 sets the G5x offset to the values you specify. So X0 clears the X offset. G20 sets the current axis location to the value specified. Think touch off.
But I still do not understand the difference. What is the difference between these two commands?
Thanks.
Nicola.
Please Log in to join the conversation.
The other sets the #522x parameters such that the current machine position becomes the given values.
Please Log in to join the conversation.
So in this case X0 works:andypugh wrote: One sets the #522x parameters to the given values
The other sets the #522x parameters such that the current machine position becomes the given values.
G10 L20 P1 X0
In this case X0 is wrong:
G10 L2 P1 X0
The right command is:
G10 L2 P1 X
I understood right?
Thanks and happy holidays.
Nicola.
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
For example using this command to touch off the right side of the piece.
You would type G10L2P1X0, if you wanted that point to be 0 in your G54 work coordinate system.
If you were locating off a hole 1" from where you want the edge to be you could enter G10L2P1X1.
Please Log in to join the conversation.
