IF(#29 == 1) GOTO 1000; IF(#29 == 2) GOTO 2000; #12=$3; /* Stores G90/G91 modal group */ #4=#34; /* Retraction amount D */ #5=#16+1; /* Dwell Time */ 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 #8=0; IF (#36 != #0) GOTO 105; /* If R is specified or not */ #7=#0; N105 IF (#35 != #0) GOTO 110; /* If drilling axis is specified or not */ #10=#0; N110 IF ($2 == 18) GOTO 300; IF ($2 == 19) GOTO 400; ; /* G17 Plane */; N200 ;G0X#24Y#25; 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#25; G#12G0X#24Y#25A#1B#2C#3U#21V#22W#23 G91Z#7; N220 G1Z#10; G4P#5; 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#26; 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#26; G#12G0X#24Z#26A#1B#2C#3U#21V#22W#23; G91Y#7; N320 G1Y#10; G4P#5; 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#26; 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#26; G#12G0Y#25Z#26A#1B#2C#3U#21V#22W#23; G91X#7; N420 G1X#10; G4P#5; 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-G82(Drilling cycle,counter boring 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 */ #5=#16+1; /* Dwell Time */ 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 #8=0; IF (#36 != #0) GOTO 1105; /* If R is specified or not */ #7=#0; #14=#0; /* For B */ N1105 IF (#35 != #0) GOTO 1200; /* If drilling axis is specified or not */ #10=#0; ; /* 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#7; B#14; /* For B */ N1220 G1Z#10B#10; /* For B */ G4P#5; 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 */ #5=#16+1; /* Dwell Time */ 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 #8=0; IF (#36 != #0) GOTO 2105; /* If R is specified or not */ #7=#0; N2105 IF (#35 != #0) GOTO 2200; /* If drilling axis is specified or not */ #10=#0; ; /* G17 Plane */; N2200 G0X#24A#1; B#36; G91F#6; #30=#36; GOTO 2220; N2210 G#12G0X#24A#1; G91B#7; N2220 G1B#10; /* For B */ G4P#5; G0B-#10; /* For B */ B-#7; /* For B */ #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 */