(G12 I) O9012 G91 G01 X#494 G02 X0 I-#494 G01 X-#494 M99 (G13 I) O9013 G91 G01 X#494 G03 X0 I-#494 G01 X-#494 M99 (G81 X Y Z R K) O9081 (# 1- # 3 records the coordinates of the tool workpiece at the beginning of the command) #1 = #451 #2 = #452 #3 = #453 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mode (Find R plane Z coordinate # 4 and hole bottom Z coordinate # 5, and X, Y cyclically increase distance # 6, # 7) #4 = #497 #5 = #490 #6 = #488-#1 #7 = #489-#2 GOTO 2 N1 #4 = #3+#497 #5 = #3+#490 #6 = #488 #7 = #489 (Find the Z coordinate of the retraction point # 8 according to the canned cycle retraction command and the positional relationship between # 3 and # 4) N2 IF [#449LT0]*[#4LT#3] GOTO 3 #8 = #4 GOTO 4 N3 #8 = #3 (# 11 recording cycle number K) N4 #11 = #496 IF #11>0 GOTO 6 #11 = 1 (Z axis rapid feed to point R) N6 IF #4LT#3 GOTO 5 G90 G00 Z#4 (Loop processing) N5 WHILE#11>0DO13 G91 G00 X#6 Y#7; XY rapid feed to the hole G90 G00 Z#4; Z quickly feeds to point R. G90 G01 Z#5; Z Drill to hole bottom at cutting speed G90 G00 Z#4; Z quickly raises to the R position #11 = #11-1; The number of cycles decreases END13 G90 G00 Z#8; Z quickly raises to # 8 position M99 (G82 X Y Z R K P) O9082 #9 = #484 IF #9>0 GOTO 6 #9 = 1 (# 1- # 3 records the coordinates of the tool workpiece at the beginning of the command) N6#1 = #451 #2 = #452 #3 = #453 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mod (Find R plane Z coordinate # 4 and hole bottom Z coordinate # 5, and X, Y cyclically increase distance # 6, # 7) #4 = #497 #5 = #490 #6 = #488-#1 #7 = #489-#2 GOTO 2 N1 #4 = #3+#497 #5 = #3+#490 #6 = #488 #7 = #489 (Find the Z coordinate of the retraction point # 8 according to the canned cycle retraction command and the positional relationship between # 3 and # 4) N2 IF [#449LT0]*[#4LT#3] GOTO 3 #8 = #4 GOTO 4 N3 #8 = #3 (# 11 recording cycle number K) N4 #11 = #496 IF #11>0 GOTO 7 #11 = 1 (Z axis rapid feed to point R) N7 IF #4LT#3 GOTO 5 G90 G00 Z#4 (Loop processing) N5 WHILE#11>0DO13 G91 G00 X#6 Y#7; XY rapid feed to the hole G90 G00 Z#4; Z quickly feeds to point R. G90 G01 Z#5; Z Drill to hole bottom at cutting speed G04P#9 G90 G00 Z#4; Z quickly raises to the R position #11 = #11-1; The number of cycles decreases END13 G90 G00 Z#8; Z quickly raises to # 8 position M99 (G83 X Y Z R Q K) O9083 (# 1- # 3 records the coordinates of the tool workpiece at the beginning of the command) #1 = #451 #2 = #452 #3 = #453 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mode (Find R plane Z coordinate # 4 and hole bottom Z coordinate # 5, and X, Y cyclically increase distance # 6, # 7) #4 = #497 #5 = #490 #6 = #488-#1 #7 = #489-#2 GOTO 2 N1 #4 = #3+#497 #5 = #3+#490 #6 = #488 #7 = #489 (Find the Z coordinate of the retraction point # 8 according to the canned cycle retraction command and the positional relationship between # 3 and # 4) N2 IF [#449<0]*[#4<#3] GOTO 3 #8 = #4 GOTO 4 N3 #8 = #3 (# 11 recording cycle number K) N4 #11 = #496 IF #11>0 GOTO 9 #11 = 1 (Z axis rapid feed to point R) N9 IF #4<#3 GOTO 5 G90 G00 Z#4 (Loop processing) N5 WHILE#11>0DO13 #9 = #4 G91 G00 X#6 Y#7; XY rapid feed to the hole G90 G00 Z#4; Z quickly feeds to point R. N6#10 = #9+1 #9 = #9-#485 IF #9> = #5 GOTO 7 #9 = #5 N7G90 G00 Z#10 G90 G01 Z#9; Z Drill gradually to the bottom of the hole at the cutting speed G90 G00 Z#4; Z quickly raises to the R position IF #9 = = #5 GOTO 8 GOTO 6 N8#11 = #11-1; The number of cycles decreases END13 G90 G00 Z#8; Z quickly raises to # 8 position M99 (G28 X Y Z A) O9028 #1 = #451 #2 = #452 #3 = #453 #4 = #454 IF #450 LT 0 GOTO 1 #5 = #488 #6 = #489 #7 = #490 #8 = #491 GOTO 2 N1 #5 = #1+#488 #6 = #2+#489 #7 = #3+#490 #8 = #4+#491 N2 G90 G00 X#5 Y#6 Z#7 A#8 IF#455EQ0GOTO 3 IF#455EQ1GOTO 4 IF#455EQ2GOTO 5 IF#455EQ3GOTO 6 IF#455EQ4GOTO 7 IF#455EQ5GOTO 8 IF#455EQ6GOTO 9 N3 #9 = -#800 #10 = -#801 #11 = -#802 #12 = -#803 GOTO 10 N4 #9 = -#800-#804 #10 = -#801-#805 #11 = -#802-#806 #12 = -#803-#807 GOTO 10 N5 #9 = -#800-#808 #10 = -#801-#809 #11 = -#802-#810 #12 = -#803-#811 GOTO 10 N6 #9 = -#800-#812 #10 = -#801-#813 #11 = -#802-#814 #12 = -#803-#815 GOTO 10 N7 #9 = -#800-#816 #10 = -#801-#817 #11 = -#802-#818 #12 = -#803-#819 GOTO 10 N8 #9 = -#800-#820 #10 = -#801-#821 #11 = -#802-#822 #12 = -#803-#823 GOTO 10 N9 #9 = -#800-#824 #10 = -#801-#825 #11 = -#802-#826 #12 = -#803-#827 N10 G90 G00 X#9 Y#10 Z#11 A#12 M99 (G102 Oblique ellipse X length Y width A Oblique oval axis and X axis angle B Initial angle C End angle L Angle step) O9102 #1 = #451 #2 = #452 #12 = -#492 N1 #7 = #488*COS[#12] #8 = #489*SIN[#12] #10 = #7*COS[#491]-#8*SIN[#491] #11 = #7*SIN[#491]+#8*COS[#491] G01 X#10+#1 Y#11+#2 #12 = #12-#498 IF ABS[#12] <= #493 GOTO 1 G01 X#1 Y#2 M99 (G103 Inverse Ellipse X Length Y Width A Oblique Ellipse Long axis and X-axis angle B Initial angle C End angle L Angle step) O9103 #1 = #451 #2 = #452 #12 = #492 N1 #7 = #488*COS[#12] #8 = #489*SIN[#12] #10 = #7*COS[#491]-#8*SIN[#491] #11 = #7*SIN[#491]+#8*COS[#491] G01 X#10+#1 Y#11+#2 #12 = #12+#498 IF #12 <= #493 GOTO 1 G01 X#1 Y#2 M99 (G110 milling rectangular plane X long Y wide Z milling plane depth R tool radius) O9110 #21 = #451 #22 = #452 #23 = #453 #1 = #497/2 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mode #2 = #488-#497-#21 #3 = #489-#1-#22 #6 = #490 GOTO 2 N1 #2 = #488-#497 #3 = #489-#1 #6 = #490+#453 N2 #4 = #3-#497 #5 = #1 G91 G01 X#1 Y#1 G90 Z#6 G91 X#2 WHILE#5<#4DO1 #2 = -#2 Y#497 X#2 #5 = #5+#497 END1 #2 = -#2 G90 Y#22+#3 G91 X#2 G90 G00 Z#23 X#21 Y#22 M99 (G111 round circle milling plane I circle plane radius Z milling plane depth R tool radius)) O9111 #21 = #451 #22 = #452 #23 = #453 #1 = #497/2 #2 = #21+#494-#1 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mode #6 = #490 GOTO 2 N1 #6 = #490+#453 N2 #5 = #1+#21 G90 G01 Z#6 WHILE#5<#2DO1 G01 X#5 G02 X#5 I-[#5-#21] #5 = #5+#497 END1 G01 X#2 G02 X#2 I-[#2-#21] G00 Z#23 X#21 Y#22 M99 (G112 counterclockwise milling circle plane I circle plane radius Z milling plane depth R tool radius) O9112 #21 = #451 #22 = #452 #23 = #453 #1 = #497/2 #2 = #21+#494-#1 IF #450 LT 0 GOTO 1; Judge absolute coordinate programming mode or incremental coordinate mode #6 = #490 GOTO 2 N1 #6 = #490+#453 N2 #5 = #1+#21 G90 G01 Z#6 WHILE#5<#2DO1 G01 X#5 G03 X#5 I-[#5-#21] #5 = #5+#497 END1 G01 X#2 G03 X#2 I-[#2-#21] G00 Z#23 X#21 Y#22 M99 (O100 zero clearance safety height for the workpiece coordinates) O100 IF#516EQ0GOTO 0 IF#516EQ1GOTO 1 IF#516EQ2GOTO 2 IF#516EQ3GOTO 3 IF#516EQ4GOTO 4 IF#516EQ5GOTO 5 IF#516EQ6GOTO 6 IF#516EQ7GOTO 7 GOTO 30 N0 #1 = 868 GOTO 10 N1 #1 = 840 GOTO 10 N2 #1 = 844 GOTO 10 N3 #1 = 848 GOTO 10 N4 #1 = 852 GOTO 10 N5 #1 = 856 GOTO 10 N6 #1 = 860 GOTO 10 N7 #1 = 864 GOTO 10 N10 #2 = #[#1+2] #5 = #582-#2 IF#5GT0GOTO 20 G00 X0 Y0 A0 Z#582 GOTO 30 N20 G00 Z#582 X0 Y0 A0 N30 X0 Y0 A0 Z#582 M99 (O101 sub program: safez) O101 IF#516EQ0GOTO 0 IF#516EQ1GOTO 1 IF#516EQ2GOTO 2 IF#516EQ3GOTO 3 IF#516EQ4GOTO 4 IF#516EQ5GOTO 5 IF#516EQ6GOTO 6 IF#516EQ7GOTO 7 GOTO 30 N0 #1 = 868 GOTO 10 N1 #1 = 840 GOTO 10 N2 #1 = 844 GOTO 10 N3 #1 = 848 GOTO 10 N4 #1 = 852 GOTO 10 N5 #1 = 856 GOTO 10 N6 #1 = 860 GOTO 10 N7 #1 = 864 GOTO 10 N10 #2 = #[#1+2] #5 = #582-#2 IF#5LT0GOTO 20 G00 Z#582 N20 #3 = 0 M99 (O102 operation record track) O102 #1 = 0 WHILE #1 <= #108 DO2 RDRECODE[#1] G01 X#104 Y#105 Z#106 A#107 #1 = #1+1 END2 M99 (O103 zero clearance safety height is machine coordinate) O103 #1 = #582-#866 IF #1 > 0 GOTO 1 G90 G0 X0 Y0 A0 G91 G0 Z#1 GOTO 2 N1 G91 G00 Z#1 G90 G0 X0 Y0 A0 N2 G90 G00 X0 Y0 A0 M99