O9912; /*Y BIDIRECTIONAL FACING*/ IF( @90 <= #26 ) GOTO 9055; // ESCAPE.Z LOWER THEN R IF( #4 <=0 ) GOTO 9053; IF( #8 <=0 ) GOTO 9054; IF( #23 <=0 ) GOTO 9056; #27=$1; //backup GROUP 1 #28=$3; //GROUP 3 #29=$7; //GROUP 7 IF(#6!=#0) GOTO 100; #6=@91; //use default feed rate N100 IF (#6<=0) GOTO 9052; F#6; IF (#20!=#0) GOTO 120; #20=@92; N120 IF( #20 <= 0 ) GOTO 9050; // CAN'T ACCEPT PHI <= 0 IF(#23!=#0) GOTO 140; #23=#20*@93*0.01; //use default cut width N140 IF (#23<=0.1) GOTO 9000; IF (#19!=#0) GOTO 160; #19=@95; N160 IF (#19<0) GOTO 180; G97S#19M03; GOTO 200; N180 G97S#-19M04; ; N200 IF (#9<0) GOTO 600; #1=#24-#20*0.5+#23; //I>0 GOTO 640; N600 #1=#24+#20*0.5-#23; //I<0 #23=-#23; N640 IF (#10<0) GOTO 500; IF (#5<0) GOTO 540; #2=#25-#5-#20*0.5; //J>0 and E>0 #15=#10+#20+#5+#5;//initial span of Y movement #12=#15; //regular span of Y movement GOTO 580; N540 #2=#25+#5-#20*0.5; //J>0 and E<0 #15=#10-#5-#5+#20*0.5; #12=#10-#5-#5; GOTO 580; N500 IF (#5<0) GOTO 620; #2=#25+#5+#20*0.5; //J<0 and E>0 #15=#10-#20-#5-#5; #12=#15; GOTO 580; N620 #2=#25-#5+#20*0.5; //J<0 and E<0 #15=#10+#5+#5-#20*0.5; #12=#10+#5+#5; ; N580 #11=ABS(#9/#23); //number of passes along Y axis(unnormalized) IF (#11>FIX(#11)+0.01) GOTO 220; //check integer #11=#11-1; N220 #11=FIX(#11); IF(@94<0.5) GOTO 240; #23=#9/(#11+1); //CONSTANT CUT WIDTH function N240 #3=#8/#4; //number of passes in Z axis(unnormalized) IF (#3>FIX(#3)+0.01) GOTO 260; #3=#3-1; N260 #3=FIX(#3); //number of passes in Z axis #17=#26-#4; G40M08; //coolant ; N1000 IF (#3<0.5) GOTO 2000; //loop controlling the Z movement starts here G90G0Z@90; X#1Y#2; Z#17; G91G01Y#15; #13=#11; //counter initialization N1050 IF (#13<0.5) GOTO 1100; G01X#23; Y-#12; #13=#13-1; IF (#13<0.5) GOTO 1100; G01X#23; Y#12; #13=#13-1; GOTO 1050; //loop controlling XY plane movement ends here N1100 #3=#3-1; #17=#17-#4; GOTO 1000; //loop controlling the Z movement ends here N2000 #17=#26-#8; //Z coord of final Z movement G90G0Z@90; X#1Y#2; Z#17; G91G01Y#15; #13=#11; N2050 IF (#13<0.5) GOTO 9000; G91G01X#23; Y-#12; #13=#13-1; IF (#13<0.5) GOTO 9000; G01X#23; Y#12; #13=#13-1; GOTO 2050; N9000 G90G0Z@90; ;; M05; ;; M09; ;; X#24Y#25; G#27G#28G#29; //restore original modes M99; ;//---------------------------------------------------------------------------- N9050 $599=50; N9051 $599=51; N9052 $599=52; N9053 $599=53; N9054 $599=54; N9055 $599=55; N9056 $599=56; ;/**********************************************************************/ ;/* Modified on 1997-02-12 Bu Bing Shi Lee */ ;/* update by Yi-Wan Lin 06/26/1998 10:30:41 */ ;/* */ ;/* O9912 performs the BIDIRECTIONAL FACING along Y axis. */ ;/* It means the tool moves along Y axis back and forth to remove */ ;/* material from work piece. */ ;/* I>0 J>0 means the datum point is the lower left corner. */ ;/* I>0 J<0 means the datum point is the upper left corner. */ ;/* I<0 J>0 means the datum point is the lower right corner. */ ;/* I<0 J<0 means the datum point is the upper right corner. */ ;/* */ ;/* The tool keeps E length away from workpiece both the beginning */ ;/* and ending of cutting along Y axis (E>0). */ ;/* The tool keeps E length away from workpiece only at the starting */ ;/* of the first cutting along Y axis. It no longer keeps the E */ ;/* length for further cutting along Y axis for the sake of saving */ ;/* time (E<0). */ ;/* */ ;/* X(#24), Y(#25) : the coordnates of datum point of plane */ ;/* Z(#26) : the height where facing is started */ ;/* I(#9), J(#10) : the length and width of the face */ ;/* H(#8) : the total depth of Z movement */ ;/* D(#4) : the cut depth in Z direction */ ;/* F(#6) : the feedrate */ ;/* W(#23) : the cut width for each cutting */ ;/* E(#5) : ESCAPE WIDTH */ ;/* */ ;/* #1, #2 : the start point of each facing ct current plane */ ;/* #3 : number of passes in Z direction */ ;/* #11 : number of passes in XY place facing */ ;/* #12 : regular displacement along Y axis */ ;/* #15 : initial displacement along Y axis */ ;/* #13, #14 : counter of XY plane and Z movement */ ;/* #17 : keeps the Z coord */ ;/* */ ;/**********************************************************************/