Zeroing Work Offsets (with the G10 command) Doesn't Always Work

I am having some trouble trying to machine an array of identical parts. My process is to machine the fist part, move to the zero location of the next part, zero my work offsets with the G10 command and repeat for the second part. I machine a row of parts and then go back above the fist part and start another row. I have used this technique many times in the past without issue. I have been editing the g-code files by: adding lines to tell the machine where to start the next part, adding the G10 command to zero the offsets, and then adding the repeating code to make each piece by copying and pasting.

Currently I am having issues with the G10 command intermittently not zeroing the offsets or zeroing them in the wrong location; I believe somewhere between where the tool was cutting and the zero location for the next part. When I send the code line by line, with the MDI interface, everything always works as expected. It seems like the G10 command is getting ignored or executed too soon. Any thoughts on what could be going on? Is there a better approach to cutting an array of parts on a Shapeoko? The G92 code does not seem to be supported.

Simplified code I am using for debug that I am having the same issue with:

%
(FILENAME: )
(Tool: 0.125 End Mill)
G21
G90
G0X0.000Y0.000Z1.000
M6 T102
M3 S15000
(Position Row#1 Part#1 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X50.800Y0.000Z1.000
G10 P1 L20 X0.000
(Position Row#1 Part#2 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X50.800Y0.000Z1.000
G10 P1 L20 X0.000
(Position Row#1 Part#3 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X-101.600Y50.800Z1.000
G10 P1 L20 X0.000Y0.000
(Position Row#2 Part#1 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X50.800Y0.000Z1.000
G10 P1 L20 X0.000
(Position Row#2 Part#2 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X50.800Y0.000Z1.000
G10 P1 L20 X0.000
(Position Row#2 Part#3 ************************)
(Repeat Code Start >>>>>)
G1Z-0.635F76.2
G1X12.700Y12.700F508.0
G0Z1.000
(Repeat Code End <<<<<<)
G0X-101.600Y-50.800Z1.000
G10 P1 L20 X0.000Y0.000
M5
(End)

Try adding a G4 P1 for a one second delay before writing the G10. That will allow the buffer to clear. Maybe even a short delay before and after the G10. Writing to eeprom is a slightly more involved task than sending a motion command.

2 Likes

Thanks neilferreri. Adding a 1sec dwell before and after the G10 command seems to do the trick. It has not messed up with this format yet.

1 Like

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