G90G0Z[#7020] (Lift to a safe height) #10=#5044 (Store A coordinate in register #10) N10 IF [#10 LT 180] 20 (Go to line 20 if the loop is complete) #10=#10-360 JUMP 10 N20 IF [#10 GT -180] 50 (Go to line 50 if the loop is complete) #10=#10+360 JUMP 20 N50 G91 G0 A [-1*#10] G90 G10 L70 P0 A0 (resets machine coordinates) G90 G10 L70 P#5220 A0 (resets program coordinates)