6. CNC LATHE (CNC LATHE (MTAB)MTAB)
Program build-up for CNC Lathe using FANUCProgram build-up for CNC Lathe using FANUC
System.System.
CNC Program can be divided into three parts.CNC Program can be divided into three parts.
1. Start-up Program1. Start-up Program
2. Profile Program2. Profile Program
3. End of the Program3. End of the Program
8. Explanation:
O1000:- While writing a program on FANUC controller first line has to
be started with letter “O” followed by four digit number which specifies the
program number.
G21 G98:- G21 - specifies that program is done in metric units
G98 gives the unit of feed in mm / min
G28 U0 W0:- Makes the tool to go to home position. U & W are secondary
movements about x and z axis.
M06 T1:- Tool Change with tool position No: 1
M03 S1500:- Makes the spindle rotation in clockwise with spindle rotates at 1500
RPM
G00 X32 Z5:- G00 gives rapid position of the tool to a point X32 Z5. This is
just above the billet. This point is called as the Tool entry Point.
9. 2. Profile Program:2. Profile Program:
Profile program is based on the given part drawing.Profile program is based on the given part drawing.
10. 3. End of the Program3. End of the Program
G28 U0 W0G28 U0 W0
M05M05
M30M30
G28 U0 W0G28 U0 W0:-:- Makes the tool to go to home position. U & W areMakes the tool to go to home position. U & W are
secondarysecondary Movements about X and Z axis.Movements about X and Z axis.
M05M05 :-:- Stop the SpindleStop the Spindle
M30M30:- program stop:- program stop
11. *Miscellaneous Function*Miscellaneous Function ((M Codes)M Codes)
M00M00--Program StopProgram Stop
M01M01--Optional StopOptional Stop
M02M02--Program EndProgram End
M03M03--Spindle Rotation ClockwiseSpindle Rotation Clockwise
M04M04--Spindle Rotation Counter ClockwiseSpindle Rotation Counter Clockwise
M05M05--Spindle StopSpindle Stop
M06M06--Tool ChangeTool Change
M08M08--Coolant OnCoolant On
M09M09--Coolant OffCoolant Off
M10M10--Chuck OpenChuck Open
M11M11--Chuck CloseChuck Close
M30M30--Program Stop and RewindProgram Stop and Rewind
12. Miscellaneous Function (M Codes)Miscellaneous Function (M Codes)
M62M62--Output 1 OnOutput 1 On
M63M63--Output 2 OnOutput 2 On
M64M64--Output 1 OffOutput 1 Off
M65M65--Output 2 OffOutput 2 Off
M66M66--Wait input 1 OnWait input 1 On
M67M67--Wait input 2 OnWait input 2 On
M76M76--Wait input 1 OffWait input 1 Off
M77M77--Wait input 2 OffWait input 2 Off
M98M98--Sub-program CallSub-program Call
M99M99--Sub-program ExitSub-program Exit
20. Work Part Zero ProcedureWork Part Zero Procedure
TOOL
WORKPIECE
CHUCK
21. Facing Cycle (G94)Facing Cycle (G94)
This cycle is used for stock removal in parallel toolThis cycle is used for stock removal in parallel tool
path. It is equivalent ofpath. It is equivalent of
1. Rapid to Z Position1. Rapid to Z Position
2. Feed to X Position2. Feed to X Position
3. Feed to start Z Position3. Feed to start Z Position
4. Rapid to start X Position4. Rapid to start X Position
22. Facing Cycle (G94) Format:Facing Cycle (G94) Format:
G94 X Z FG94 X Z F
XX -- Diameter to which the movement is being made .Diameter to which the movement is being made .
ZZ -- The Z axis co-ordinate to which the movement is beingThe Z axis co-ordinate to which the movement is being
mademade
FF - Feed Rate- Feed Rate
24. Turning Cycle (G90)Turning Cycle (G90)
This cycle is used for stock removal in parallel tool path. ThisThis cycle is used for stock removal in parallel tool path. This
cycle performs fourcycle performs four distinct moves with one line ofdistinct moves with one line of
information. It is equivalent ofinformation. It is equivalent of
1. Rapid to X Position1. Rapid to X Position
2. Feed to Z Position2. Feed to Z Position
3. Feed to start X Position3. Feed to start X Position
4. Rapid to start Z Position4. Rapid to start Z Position
25. Turning Cycle (G90)Turning Cycle (G90) FormatFormat::
G90 X Z FG90 X Z F
X - Diameter to which the movement is being madeX - Diameter to which the movement is being made
Z - The Z axis co-ordinate to which the movement is beingZ - The Z axis co-ordinate to which the movement is being
mademade
F - Feed RateF - Feed Rate
26. O100O10011 ( STEP TURNING)( STEP TURNING)
G21 G98 –G21 G98 – ((Initial SettingsInitial Settings.).)
G28 U0 W0 –G28 U0 W0 – ((Going to home positionGoing to home position.).)
M06 T1 –M06 T1 – ((Tool Change Position No. 01.)Tool Change Position No. 01.)
M03 S1500 –M03 S1500 –((Spindle clockwise with 1500 RPM.)Spindle clockwise with 1500 RPM.)
G00 X33 Z5 –G00 X33 Z5 –((Tool Moving to Tool Entry Point of X33Tool Moving to Tool Entry Point of X33
Z5 at Rapid Traverse)Z5 at Rapid Traverse)
G90 X31 Z-26 F100 –G90 X31 Z-26 F100 – ((Calling G90 Cycle andCalling G90 Cycle and
defining first depth of cut)defining first depth of cut)
X30X30
X29X29
X28X28
X27 Z-14
X26
X25
X24
X23
X22
G28 U0 W0
M05
M30
31. Multiple Turning Cycle:Multiple Turning Cycle:
G71 U(Δd) R(e)
G71 P(A') Q(B) U( Δu) W( Δw) F
U - Depth of cut in Z axis
R - Relief Amount
P - Starting block of the profile
Q - Finishing block of the profile
U - Finishing Allowance in X axis
W - Finishing Allowance in Z axis
F - Feed Rate
34. Threading Cycle (G92):Threading Cycle (G92):
Format:
The G92 command performs Single pass
threading cycle. Only the x axis moves
need to be entered in subsequent blocks,
up to the minor diameter value.
G92 X Z F
Where,
X - Minor Diameter, mm
Z - Thread Length, mm
F - Pitch of the Thread, mm
36. Drilling Cycle:Drilling Cycle:
Format:Format:
G74 R (e)G74 R (e)
G74 X Z Q (Δk) FG74 X Z Q (Δk) F
R (e) - Return Amount, mmR (e) - Return Amount, mm
X - Always Zero, mmX - Always Zero, mm
Z - Drilling Depth, mmZ - Drilling Depth, mm
Q - Depth of Cut in Z axis (in Micron)Q - Depth of Cut in Z axis (in Micron)
F - Feed Rate, mmF - Feed Rate, mm