IF(#29 == 1) GOTO 1000; IF(#29 == 2) GOTO 2000; #12=$3; /* Stores G90/G91 modal group */ #4=#34; /* Retraction amount D */ IF (#11 == #0) GOTO 1; /* If K is specified or not */ IF (#11 != 0) GOTO 5; N1 #11=1; /* IF K=0 or K is not specified */ N5 #11=ABS(#11); /* K is always a positive value */ IF (#18 == #0) GOTO 7; /* If R is specified or not */ #36=#18; N7 IF ($2 == 18) GOTO 20; IF ($2 == 19) GOTO 30; ; /* Calculates the drilling amount */ ; /* #35:Drilling axis data */ N10 IF (#26 == #0) GOTO 11; #35=#26; /* If drilling axis(Z) is specified or not */ N11 #33=$32; /* Stores Z original position */ N13 IF (#12 == 91) GOTO 14; #10=#35-#36; #7=#36-#42; #32=1; GOTO 18; N14 IF (#26 != #0) GOTO 17; IF (#18 != #0) GOTO 16; IF (#32 != #0) GOTO 15; #10=#35; #7=#36; #32=#0; GOTO 18; N15 #10=#35-#30; #7=#36-#42; GOTO 18; N16 #10=#35-#33-#36; #7=#36; GOTO 18; N17 #10=#35; #7=#36-#42; N18 #26=#0; /*Reset Z value */ IF ($10 == 98) GOTO 100; #7=#0; GOTO 100; N20 IF (#25 == #0) GOTO 21; #35=#25; /* If drilling axis(Y) is specified or not */ N21 #33=$31; /* Stores Y original position */ N23 IF (#12 == 91) GOTO 24; #10=#35-#36; #7=#36-#41; #32=1; GOTO 28; N24 IF (#25 != #0) GOTO 27; IF (#18 != #0) GOTO 26; IF (#32 != #0) GOTO 25; #10=#35; #7=#36; #32=#0; GOTO 28; N25 #10=#35-#30; #7=#36-#41; GOTO 28; N26 #10=#35-#33-#36; #7=#36; GOTO 28; N27 #10=#35; #7=#36-#41; N28 #25=#0; /*Reset Y value */ IF ($10 == 98) GOTO 100; #7=#0; GOTO 100; N30 IF (#24 == #0 ) GOTO 31; #35=#24; /* If drilling axis(X) is specified or not */ N31 #33=$30; /* Stores X original position */ N33 IF (#12 == 91) GOTO 34; #10=#35-#36; #7=#36-#40; #32=1; GOTO 38; N34 IF (#24 != #0) GOTO 37; IF (#18 != #0) GOTO 36; IF (#32 != #0) GOTO 35; #10=#35; #7=#36; #32=#0; GOTO 38; N35 #10=#35-#30; #7=#36-#40; GOTO 38; N36 #10=#35-#33-#36; #7=#36; GOTO 38; N37 #10=#35; #7=#36-#40; N38 #24=#0; /*Reset X value */ IF ($10 == 98) GOTO 100; #7=#0; N100 #37=0; #8=0; IF (#36 != #0) GOTO 105; /* If R is specified or not */ #7=#0; N105 IF (#17 == 0) GOTO 130; IF (#17 == #0) GOTO 130; /* If Q is specified or not */ IF (#35 == #0) GOTO 130; /* If drilling axis is specified or not */ IF (#10 < 0) GOTO 110; #17=ABS(#17); /* Q is always a positive value */ #4=-ABS(#4); GOTO 120; N110 #17=-ABS(#17); #4=ABS(#4); N120 #16=FIX(ABS(#10/#17)); #9=#10-#17*#16; GOTO 140; N130 #16=0; #10=#0; #9=0; N140 #16=#16-1; IF (#16 >= 0) GOTO 150; #4=#0; N150 #5=#17-#4; #13=#9-#4; IF ($2 == 18) GOTO 300; IF ($2 == 19) GOTO 400; ; /* G17 Plane */; N200 G0X#24Y#25A#1B#2C#3U#21V#22W#23; IF ($10 == 99 && #12 == 91) GOTO 203; IF ($10 == 98 && #12 == 91) GOTO 201; Z#36; G91F#6; #30=#36; GOTO 220; N201 IF (#18 == #0) GOTO 202; Z#36; #7=#36; G91F#6; #30=#36; GOTO 220; N202 G90Z#36; G91F#6; #30=#36; GOTO 220; N203 IF (#18 == #0) GOTO 204; #31=#33+#36; #31=#31-$32; Z#31; G91F#6; #30=#36; GOTO 220; N204 G90Z#36; G91F#6; #30=#36; GOTO 220; N210 G#12G0X#24Y#25A#1B#2C#3U#21V#22W#23; G91Z#7; #37=0; N220 IF (#16 < 0) GOTO 240; G1Z#17; N230 IF (#37 >= #16) GOTO 240; G0Z#4; G1Z#5; #37=#37+1; GOTO 230; N240 IF (#9 == 0) GOTO 250; G0Z#4; G1Z#13; N250 G0Z-#10; Z-#7; #8=#8+1; IF (#8 < #11) GOTO 210; #18=#0; #1=#0; #2=#0; #3=#0; #21=#0; #22=#0; #23=#0; G#12M99; ; /* G18 Plane */; N300 G0X#24Z#26A#1B#2C#3U#21V#22W#23; IF ($10 == 99 && #12 == 91) GOTO 303; IF ($10 == 98 && #12 == 91) GOTO 301; Y#36; G91F#6; #30=#36; GOTO 320; N301 IF (#18 == #0) GOTO 302; Y#36; #7=#36; G91F#6; #30=#36; GOTO 320; N302 G90Y#36; G91F#6; #30=#36; GOTO 320; N303 IF (#18 == #0) GOTO 304; #31=#33+#36; #31=#31-$31; Y#31; G91F#6; #30=#36; GOTO 320; N304 G90Y#36; G91F#6; #30=#36; GOTO 320; N310 G#12G0X#24Z#26A#1B#2C#3U#21V#22W#23; G91Y#7; #37=0; N320 IF (#16 < 0) GOTO 340; G1Y#17; N330 IF (#37 >= #16) GOTO 340; G0Y#4; G1Y#5; #37=#37+1; GOTO 330; N340 IF (#9 == 0) GOTO 350; G0Y#4; G1Y#13; N350 G0Y-#10; Y-#7; #8=#8+1; IF (#8 < #11) GOTO 310; #18=#0; #1=#0; #2=#0; #3=#0; #21=#0; #22=#0; #23=#0; G#12M99; ; /* G19 Plane */; N400 G0Y#25Z#26A#1B#2C#3U#21V#22W#23; IF ($10 == 99 && #12 == 91) GOTO 403; IF ($10 == 98 && #12 == 91) GOTO 401; X#36; G91F#6; #30=#36; GOTO 420; N401 IF (#18 == #0) GOTO 402; X#36; #7=#36; G91F#6; #30=#36; GOTO 420; N402 G90X#36; G91F#6; #30=#36; GOTO 420; N403 IF (#18 == #0) GOTO 404; #31=#33+#36; #31=#31-$30; X#31; G91F#6; #30=#36; GOTO 420; N404 G90X#36; G91F#6; #30=#36; GOTO 420; N410 G#12G0Y#25Z#26A#1B#2C#3U#21V#22W#23; G91X#7; #37=0; N420 IF (#16 < 0) GOTO 440; G1X#17; N430 IF (#37 >= #16) GOTO 440; G0X#4; G1X#5; #37=#37+1; GOTO 430; N440 IF (#9 == 0) GOTO 450; G0X#4; G1X#13; N450 G0X-#10; X-#7; #8=#8+1; IF (#8 < #11) GOTO 410; #18=#0; #1=#0; #2=#0; #3=#0; #21=#0; #22=#0; #23=#0; G#12M99; ;/* This MACOR is designed for MILL-G73(High-speed peck drilling cycle) */; ;/* Version 2.0 Modifier: ChingFu & Josan 2003/8/27 11:18¤W¤È*/ ; N1000 #12=$3; /* Stores G90/G91 modal group */ #4=#34; /* Retraction amount D */ IF (#11 == #0) GOTO 1001; /* If K is specified or not */ IF (#11 != 0) GOTO 1005; N1001 #11=1; /* IF K=0 or K is not specified */ N1005 #11=ABS(#11); /* K is always a positive value */ IF (#18 == #0) GOTO 1010; /* If R is specified or not */ #36=#18; ; /* Calculates the drilling amount */ ; /* #35:Drilling axis data */ N1010 IF (#26 == #0) GOTO 1011; #35=#26; /* If drilling axis(Z) is specified or not */ N1011 #33=$32; /* Stores Z original position */ #28=$35; /* Stores B original position */ N1013 #10=#35-#36; #7=#36-#42; #14=#36-#43; /* For B */ #32=1; #26=#0; /*Reset Z value */ #2=#0; /*Reset B value */ IF ($10 == 98) GOTO 1100; #7=#0; #14=#0; /* For B */ N1100 #37=0; #8=0; IF (#36 != #0) GOTO 1105; /* If R is specified or not */ #7=#0; #14=#0; /* For B */ N1105 IF (#17 == 0) GOTO 1130; IF (#17 == #0) GOTO 1130; /* If Q is specified or not */ IF (#35 == #0) GOTO 1130; /* If drilling axis is specified or not */ IF (#10 < 0) GOTO 1110; #17=ABS(#17); /* Q is always a positive value */ #4=-ABS(#4); GOTO 1120; N1110 #17=-ABS(#17); #4=ABS(#4); N1120 #16=FIX(ABS(#10/#17)); #9=#10-#17*#16; GOTO 1140; N1130 #16=0; #10=#0; #9=0; N1140 #16=#16-1; IF (#16 >= 0) GOTO 1150; #4=#0; N1150 #5=#17-#4; #13=#9-#4; ; /* G17 Plane */; N1200 G0X#24Y#25A#1; /* For B */ Z#36B#36; G91F#6; #30=#36; GOTO 1220; N1210 G#12G0X#24Y#25A#1; G91Z#7B#14; /* For B */ #37=0; N1220 IF (#16 < 0) GOTO 1240; G1Z#17B#17; /* For B */ N1230 IF (#37 >= #16) GOTO 1240; G0Z#4B#4; /* For B */ G1Z#5B#5; /* For B */ #37=#37+1; GOTO 1230; N1240 IF (#9 == 0) GOTO 1250; G0Z#4B#4; /* For B */ G1Z#13B#13; /* For B */ N1250 G0Z-#10B-#10; /* For B */ Z-#7B-#14; /* For B */ #8=#8+1; IF (#8 < #11) GOTO 1210; #18=#0; G#12M99; ;/* Above is for specfied canned cycle(axis A, B) using only */ ;/* Type I, Using XYZAB & only supporting for G17 & G90*/ ; N2000 #12=$3; /* Stores G90/G91 modal group */ #4=#34; /* Retraction amount D */ IF (#11 == #0) GOTO 2001; /* If K is specified or not */ IF (#11 != 0) GOTO 2005; N2001 #11=1; /* IF K=0 or K is not specified */ N2005 #11=ABS(#11); /* K is always a positive value */ IF (#18 == #0) GOTO 2010; /* If R is specified or not */ #36=#18; ;/* Calculates the drilling amount */ ;/* #35:Drilling axis data */ N2010 IF (#2 == #0) GOTO 2011; #35=#2; /* If drilling axis(B) is specified or not */ N2011 #33=$35; /* Stores B original position */ N2013 #10=#35-#36; #7=#36-#43; #32=1; #2=#0; /*Reset B value */ IF ($10 == 98) GOTO 2100; #7=#0; N2100 #37=0; #8=0; IF (#36 != #0) GOTO 2105; /* If R is specified or not */ #7=#0; N2105 IF (#17 == 0) GOTO 2130; IF (#17 == #0) GOTO 2130; /* If Q is specified or not */ IF (#35 == #0) GOTO 2130; /* If drilling axis is specified or not */ IF (#10 < 0) GOTO 2110; #17=ABS(#17); /* Q is always a positive value */ #4=-ABS(#4); GOTO 2120; N2110 #17=-ABS(#17); #4=ABS(#4); N2120 #16=FIX(ABS(#10/#17)); #9=#10-#17*#16; GOTO 2140; N2130 #16=0; #10=#0; #9=0; N2140 #16=#16-1; IF (#16 >= 0) GOTO 2150; #4=#0; N2150 #5=#17-#4; #13=#9-#4; ; /* G17 Plane */; N2200 G0X#24A#1; B#36; G91F#6; #30=#36; GOTO 2220; N2210 G#12G0X#24A#1; G91B#7; #37=0; N2220 IF (#16 < 0) GOTO 2240; G1B#17; N2230 IF (#37 >= #16) GOTO 2240; G0B#4; G1B#5; #37=#37+1; GOTO 2230; N2240 IF (#9 == 0) GOTO 2250; G0B#4; G1B#13; N2250 G0B-#10; B-#7; #8=#8+1; IF (#8 < #11) GOTO 2210; #18=#0; G#12M99; ;/* Above is for specfied canned cycle(axis A, B) using only */ ;/* Type II, Using XAB & only supporting for G17 & G90 */