891
G-Code, CAD, and CAM discussions / Re: Gcode offset
« on: May 20, 2015, 04:23:31 AM »
You need to look at using G52
G52 is a local offset from the current fixture offset so you can set G54 to Xnnn Ynnn Znnn and then when you wish to use the second spindle call G52 Xnnn Ynnn Znnn with the offset from the first spindle. then when you want to go back to the first spindle call G52 X0 Y0 Z0
If the position of the spindle changes you can use variables to do this e.g.
(Start of program)
#100=243.0 (X offset)
#101=125.0 (Y offset)
#102=66.0 (Z offset)
G54
G00 G90 G43 X0 Y0 Z25. S2000 M3
Z1.
G01 Z-2. F500.
ETC.....
(CHANGE TO SECOND SPINDLE)
G52 X#100 Y#101 Z#102
G00 X0 Y0 Z25.
ETC.....
G52 X0 Y0 Z0
M30
G52 is a local offset from the current fixture offset so you can set G54 to Xnnn Ynnn Znnn and then when you wish to use the second spindle call G52 Xnnn Ynnn Znnn with the offset from the first spindle. then when you want to go back to the first spindle call G52 X0 Y0 Z0
If the position of the spindle changes you can use variables to do this e.g.
(Start of program)
#100=243.0 (X offset)
#101=125.0 (Y offset)
#102=66.0 (Z offset)
G54
G00 G90 G43 X0 Y0 Z25. S2000 M3
Z1.
G01 Z-2. F500.
ETC.....
(CHANGE TO SECOND SPINDLE)
G52 X#100 Y#101 Z#102
G00 X0 Y0 Z25.
ETC.....
G52 X0 Y0 Z0
M30