How to reset 5221, 5222 and 5223 parameters (G54)?

More
8 years 10 months ago #102956 by nicokid
Hi,
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.

More
8 years 10 months ago #102960 by andypugh
What does M100 do?

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.

More
8 years 10 months ago #102992 by nicokid
Hi, I copied M100 somewhere:
Code:
#! /bin/sh axis-remote --reload exit 0

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.

More
8 years 10 months ago #102996 by Todd Zuercher
G10 L2 P1 X0 Y0 Z0 will reset the G54 offsets for XYZ back to 0.

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.

More
8 years 10 months ago #103210 by nicokid

Todd Zuercher wrote: G10 L2 P1 X0 Y0 Z0 will reset the G54 offsets for XYZ back to 0.

Uh, you're right, I've read the documentation better.

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.

OK! I got it.
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:
Code:
instead of setting the offset/entry to the given value, it is set to a calculated value that makes the current coordinates become the given value
I think I did not understand.:blink:

Thanks.
Nicola.

Please Log in to join the conversation.

More
8 years 10 months ago #103251 by Todd Zuercher
L2 sets the G5x offset to the values you specify. So X0 clears the X offset. L20 sets the current axis location to the value specified. Think touch off.

Please Log in to join the conversation.

More
8 years 10 months ago #103424 by nicokid

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.

I think you meant writing L2 and L20.
But I still do not understand the difference. What is the difference between these two commands?
Code:
G10 L20 P1 X0
Code:
G10 L2 P1 X0
In both cases I specify a value :blink:
Thanks.

Nicola.

Please Log in to join the conversation.

More
8 years 10 months ago #103508 by andypugh
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.

Please Log in to join the conversation.

More
8 years 10 months ago #103721 by nicokid

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.

So in this case X0 works:
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.

More
8 years 10 months ago #103722 by Todd Zuercher
No, The X must have a number after it.
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.

Time to create page: 0.125 seconds
Powered by Kunena Forum