I need an example of G code that allows me to repeat the same part but shifting coordinate system over X so that I can use the same subroutine that cuts the part.
Example of pseudo code I have in mind;
( -- Init --- )
G00 G49 G40.1 G17 G80 G50 G90
G20
(--- Set coord system to 0,0 ---)
G??? X0 Y0
(--- execute part cutting ---)
M98 P0002 L1
(--- Set/Shift coord system to 2.7,0 ---)
G??? X2.7 Y0
(--- execute part cutting ---)
M98 P0002 L1
(--- Set/Shift coord system to 5.4,0 ---)
G??? X5.4 Y0
(--- execute part cutting ---)
M98 P0002 L1
(-- Reset coord system back to 0,0 --)
G?? X0 Y0
M5
M9
M30 (-- end of program/rewind -- )
(-- Cutting Subroutine here --)
O0002
G0 ...
G1 ...
G0 ...
G1 ...
(-- Return from sub --)
M99
--------------------------------------------------------
Please help me out with ??? commands. What am I missing here? G52 doesn't seem to work.
Example of pseudo code I have in mind;
( -- Init --- )
G00 G49 G40.1 G17 G80 G50 G90
G20
(--- Set coord system to 0,0 ---)
G??? X0 Y0
(--- execute part cutting ---)
M98 P0002 L1
(--- Set/Shift coord system to 2.7,0 ---)
G??? X2.7 Y0
(--- execute part cutting ---)
M98 P0002 L1
(--- Set/Shift coord system to 5.4,0 ---)
G??? X5.4 Y0
(--- execute part cutting ---)
M98 P0002 L1
(-- Reset coord system back to 0,0 --)
G?? X0 Y0
M5
M9
M30 (-- end of program/rewind -- )
(-- Cutting Subroutine here --)
O0002
G0 ...
G1 ...
G0 ...
G1 ...
(-- Return from sub --)
M99
--------------------------------------------------------
Please help me out with ??? commands. What am I missing here? G52 doesn't seem to work.