( Macro - Reset Work Position to Zero        )
( #5520 - Current Coordinate system number   )
( #5021 ... #5026 - Current Machine Position )
( #5401 ... #5406 - Current Tool Offset      )
( #10 - Given axis (0-X;1-Y;2-Z;3-A;4-B;5-C) )

(debug #10)

if [ #10 eq 0 ] 20 ; reset X position
if [ #10 eq 1 ] 30 ; reset Y position
if [ #10 eq 2 ] 40 ; reset Z position
if [ #10 eq 3 ] 50 ; reset A position
if [ #10 eq 4 ] 60 ; reset B position
if [ #10 eq 5 ] 70 ; reset C position

GOTO 100

N20 G90 G92 X0 A0B0
GOTO 100
N30 G90 G92 Y0 A0B0
GOTO 100
N40 G90 G92 Z0 A0B0
GOTO 100
N50 G90 G92 A0
GOTO 100
N60 G90 G92 B0
GOTO 100
N70 G90 G92 C0
GOTO 100


N100
