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 (rotation diameter of tool center) S2000 M03
G54 G90 G00 X0 Y0 Z50.
G0X#6 (G0 quickly moves to above the cutting point)
Z[-#4+1] (G0 drops to 1. on the Z-#4 surface, that is, 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 round hole, G03 walks a whole circle counterclockwise)
G1X[#6-1] (G01 returns 1 to the center, that is, retracts the tool)
G0Z50.
M30





