+1 vote
in Cnc Lathe by (130 points)

I have a problem with my code not running, I get errors on lines  7,8,11,16 and 21 . 

here's the code 




(OD TURN ); 


G54 ;

G50 S1200 ;

G96 S600 M03 ;

G00 X3.075 ;

G00 Z0.05 ;

G71 P101 Q102 U0 W0 D0.025 F0.005 ;

N101 G00 X2.85 ;

G01 X2.85 Z-1. ;

N102 G01 X3.0.75 ;

G00 X3.075 Z0.05 ;

G71 P103 Q104 U0 W0 D0.025 F0.005 ;

N103 G00 X2.5 ;

G01 X2.5 Z-1. ;

N104 G01 X3.075 ; 

G00 X3.075 Z0.05 ;

G71 P105 Q105 U0 W0 D0.025 F0.005 ;

N105 G00 X2.235 ;

G01 X 2.235 Z-1. ;

N106 G01 X3.075 ;

G00 X3.075 Z0.05 ;

M05 ;

M01 ;


1 Answer

+1 vote
Looks like a Fanuc controller - if that is the case and the G codes for canned operations is the same, you need an additional G71 instruction in the block immediately preceding the current G71 block, I believe it has a Q and a P variable (same variable names as the current code block you have, but the preceding block serves a different purpose).  From memory (I am much more fluent with Okuma controllers), I believe the two preceding variables define the depth of cut per pass and how much stock to leave for a finish pass.  Hope this helps!