O9913; /* UNDIRECTIONAL X 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; //GROUP 1 (G00 G01 G02 G03)1 #28=$3; //GROUP 3 (G90 G91) #29=$7; //GROUP 7 (G40 G41 G42) 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; //too small W is not allowed IF (#19!=#0) GOTO 160; #19=@95; N160 IF (#19>0) GOTO 180; M04S-#19; GOTO 200; N180 M03S#19; ; N200 #5=ABS(#5); IF (#10<0) GOTO 600; #2=#25-#20*0.5+#23; //J>0 GOTO 640; N600 #2=#25+#20*0.5-#23; //J<0 #23=-#23; N640 IF (#9<0) GOTO 500; #1=#24-#5-#20*0.5; //I>0 #12=#9+#20+#5+#5; //initial span of X movement GOTO 580; N500 #1=#24+#5+#20*0.5; //I<0 #12=#9-#20-#5-#5; ; N580 #11=ABS(#10/#23); //number of passes along X axis(unnormalized) IF (#11>FIX(#11)+0.01) GOTO 220; //check integer #11=#11-1; N220 #11=FIX(#11); IF (#11>0) GOTO 230; #11=0; N230 IF (@94<0.5) GOTO 240; #23=#10/(#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; M8; N1000 IF (#3<0.5) GOTO 2000; //loop controlling the Z movement starts here G90G00Z@90; X#1Y#2; Z#17; G04P1; G91G01Z-#4; G04P1; X#12; #13=#11; //loop controlling the XY movement starts here N1100 IF (#13<0.5) GOTO 1150; G90G00Z@90; G91X-#12Y#23; G90Z#17; G04P1; G91G01Z-#4; G04P1; X#12; #13=#13-1; GOTO 1100; //loop controlling XY plane movement ends here N1150 #3=#3-1; #17=#17-#4; GOTO 1000; //loop controlling the Z movement ends here N2000 #26=#26-#8; G90G0Z@90; X#1Y#2; Z#17; G04P1; G01Z#26; G04P1; G91X#12; #13=#11; N2050 IF (#13<0.5) GOTO 9000; G90G00Z@90; G91X-#12Y#23; G90Z#17; G04P1; G01Z#26; G04P1; G91X#12; #13=#13-1; GOTO 2050; N9000 G90G00Z@90; G#27G#28G#29; 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:29:00 */ ;/* */ ;/* This Macro simulates the FACING machining guidance function */ ;/* performing UNIDIRECTIONAL X FACING */ ;/* */ ;/* 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. */ ;/* G04P1 is used instead of G09 because of the unstablility. */ ;/* */ ;/* 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 */ ;/* NOTE : the Z coord of the first machined plane is Z(#26-d) */ ;/* instead of Z(#26) */ ;/* */ ;/* #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 : movement along X direction */ ;/* #13, #14 : counter of XY plane and Z movement */ ;/* #17 : keeps the Z coord */ ;/* */ ;/**********************************************************************/