How to undo 'g10 l20 p1 x0 y0 z.2' command
05 Nov 2021 21:28 #225431
by dansawyer
How to undo 'g10 l20 p1 x0 y0 z.2' command was created by dansawyer
The project is to create the same pattern in two locations on a mill. Upon completion of the first pattern a 'g01 x 7 y 0' command is issued top position the workpiece and the 'origin' of the second pattern. A 'g10 l20 p1 x0 y0 z.2' command is issued to set the x, y, z values correct for the pattern and to create origin offsets in G54. This all works.
My question is at the completion of the pattern what is the command to undo the above g10 command? I would like to reset x, y, and z to the values prior the the g10 commnad.
Thanks, Dan
My question is at the completion of the pattern what is the command to undo the above g10 command? I would like to reset x, y, and z to the values prior the the g10 commnad.
Thanks, Dan
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18563
- Thank you received: 6218
06 Nov 2021 00:24 #225455
by tommylight
Replied by tommylight on topic How to undo 'g10 l20 p1 x0 y0 z.2' command
I might be missing something, but i would think that is why G55, G56, G57 etc exist.
Sorry, can not do a search for it.
Sorry, can not do a search for it.
Please Log in or Create an account to join the conversation.
06 Nov 2021 22:47 #225538
by andypugh
Replied by andypugh on topic How to undo 'g10 l20 p1 x0 y0 z.2' command
This sounds like a job for the G92 command. (as that is readily reversible)
linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g92
linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g92
Please Log in or Create an account to join the conversation.
07 Nov 2021 06:40 #225548
by Michael
Replied by Michael on topic How to undo 'g10 l20 p1 x0 y0 z.2' command
Your going to get a lot of different answers because there are probably a dozen ways to do this most of which are better than the path you started down.
To answer your question you can't undo a G10 L20 with a simple g code but you can redo that some code in the location of the origin when you first used it. Basically do what you did but in the negative direction. The below assumes your z position when you began was Z .2
G01 X-7 Y0 Z.2
G10 L20 P1 X0 Y0 Z.2
Personally I would setup two patterns in CAD CAM and use a single origin to machine both. This would allow fewer tool changes and a bit more efficiency. The nice thing about the origins G54 G55 etc is they don't always need to be touched off everytime if you have an accurate machine that isn't losing position when it's off or home repeatability.
Your G55 could be the fixed corner of a vise jaw or a hole in a fixture plate. These can be very repeatable for a wide variety of work if you do it correctly.
To answer your question you can't undo a G10 L20 with a simple g code but you can redo that some code in the location of the origin when you first used it. Basically do what you did but in the negative direction. The below assumes your z position when you began was Z .2
G01 X-7 Y0 Z.2
G10 L20 P1 X0 Y0 Z.2
Personally I would setup two patterns in CAD CAM and use a single origin to machine both. This would allow fewer tool changes and a bit more efficiency. The nice thing about the origins G54 G55 etc is they don't always need to be touched off everytime if you have an accurate machine that isn't losing position when it's off or home repeatability.
Your G55 could be the fixed corner of a vise jaw or a hole in a fixture plate. These can be very repeatable for a wide variety of work if you do it correctly.
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds