(ROGGRAM BY Shangshan_Houde)
O0001
#1=30 (hole diameter)
#2=20 (hole depth)
#3=20 (Tool diameter)
#4=0(Z coordinate)
#5=1 (cutting depth of each layer)
#6=[#1-#3]/2 (Turning diameter of tool center) S2000 M03
G54 G90 G00 X0 Y0 Z50.
G0X#6 (G0 quickly moves above the lower tool point)
Z[-#4+1] (G0 drops to 1. at Z-#4 surface, namely at Z1.)
G1Z-#4F200. (G1 in the Z direction drops to the current starting processing depth Z-#4)
WHILE[#4LT#2]DO1 (when processing depth #4 is less than hole depth #2, cycle program 1)
#4=#4+#5 (cutting depth of each layer)
G3I-#6Z-#4F500. (G03 counterclockwise spiral processing to the next layer)
END1 (End of loop 1)
G3I-#6 (reach the depth of the hole, G03 walks the whole circle counterclockwise)
G1X[#6-1] (G01 returns 1 to the center, ie retracts the tool)
G0Z50.
M30
|