Fanuc CNC Lathe Programming
Fanuc CNC Lathe Programming
Home
X is always the diameter of the part. Z is the absolute length dimension. (This was not always so, a lot of European machines used Radius for X.) The finish face of the part is set to be Z zero. Dimensions are written and entered into the control with decimal points, X2.0 represents a diameter of 2". The motions available: G0=Rapid (Max available, can usually be overridden.) G1=Linear feed (Needs feedrate) G2= Circular CW G3=Circular CCW There are a lot more G codes, they will be explained as they appear in the following simple program. If you need any help with any lathe or mill programming question, call me at 614-888-84676 or send an email to [email protected]
Face-Turn lathe Part(Fanuc 0T, also most other compatible controls.) Part is 2" OD, will be finish faced with OD skin cut taken. O2001(Program number) N1G50S2500(The G50 sets up safe max speed.) N2T0101(Tool index to position 1, use tool offset 1 to set tool and to change part size.) N3 G96S650M3(G96 is Constant Surface Feet, S is amount, M3 is spindle on CW.)
N4G0X2.1Z0(Rapid to above OD and face of part.) N5G1X.5F.006(Face to .500 at a feed of .006 per rev. N6G0X2.0Z.1(Rapid to 2" diam. and clear part on way up.) N7G1Z-1.0F.001(Cut left at F.001.) N8G0X6.0Z6.0(Rapid to clear for loading new part, newer controls do not need tool offset cancellation.) N9M30( Ends program, resets memory to start.) Usually coolant is used, M8 is on, M9 is off. The typical Canned Cycles to make programming a lot easier: G71 does turning-boring with very little info. G76 cuts a thread, straight or tapered, also with very short, basic info. Example: G76 Threading Cycle in 2 line format for OT and later controls. 2" diameter, 20 Threads per Inch, Mild Steel. O2006* N1 G50 S1500* N2 T0101* N3 G97 S700 M3*(Speed for threading, always in RPM) N4 G0 X2.2 Z.2 M8*(Rapid to above part, .2" from face) N5 G76 P021060 Q20 R5*(The first 2 digits in P represent the amount of finish passes, the next 2 are the pullout distance at the end of the threading motion, expressed in tenths of revolutions, the 60 is the angle of the tool) N6 G76 X1.94 Z-1.0 P300(total thread depth) Q150(depth of first cut) F.05* R if needed is the amount of taper over total distance in thread motion. The P value is figured by taking the F-value times the constant of .6, once figured you also have the X value. N7 G0 X6.0 Z6.0 M9* N8 M30*
N4 G0 X4.0 Z.1 M8(Rapid to OD of part, .1" away from face, turn coolant on) N5 G71 U.15 R.02(U=cutting depth, R= pullaway distance after each cut) N6 G71 P7 Q9 U.05 W.005 F.015(P7 tells the control to look at N7 and Q9 to look at N9, this is how we give the motions describing the part. U is the amount of stock left for finishing on the OD, W is the amount left on the shoulder. N7 G0 X2.0 N8 G1 Z-1.0 N9 X4.0 N10 G0 X6.0 Z6.0 M9(Rapid back to a position clear of the workpiece) M30
Call or E-Mail for any questions. 614-888-8466, ask for Heinz. [email protected] .