1. CNC – Lathe OperatingCNC – Lathe Operating
& Programming& Programming
Prepared by
Virender Singh Bhati
Akash Shukla
Guidance by Mr. Dharmendra Rajput
HOD – Tool Room Department
NSIC Rajkot
1
2. Introduction CNC Technology
CNC-Computer Numerical Control
CNC is a method of automatically operating a machine
by using letter, numbers and special characters.
Use of CNC Machine
For high accuracy
For lot production
For high production rate
For manufacturing critical shape which not possible on
conventional
2Prepared by V.S.Bhati & Akash Shukla
10. The turret
holds and
moves the
tools.
Tools are
bolted to
the turret
using a
variety of
specialized
holders,
depending
on the type
of tool.
10
Prepared by V.S.Bhati & Akash
Shukla
12. It is use for
Clamp(Loading) &
Decamp (Unloading) of
Work piece
12
Prepared by V.S.Bhati & Akash
Shukla
13. Principal of CNC Lathe
In cnc lathe machine tool in movement against
rotating work piece.
Tool in movement linear
Work piece is rotating
Work Piece – Cylinder
Tool – Single Point Cutting Tool
13Prepared by V.S.Bhati & Akash Shukla
14. Work Piece Zero Position
The work piece zero point (W)
is specified by the
programmer and should
always be chosen according
to the dimensioning of the
drawing. For turning work it
lies mostly on the turning axis
and the right hand face.
14Prepared by V.S.Bhati & Akash Shukla
15. Home Position / Ref. Position
The reference point (R) is
also called Home position.
At Home Position Machine
position is always Zero.
We can change our tool
automatically at Home
Position.
15Prepared by V.S.Bhati & Akash Shukla
16. Machine Zero & Program Zero
16Prepared by V.S.Bhati & Akash Shukla
17. Points and distances with the work space
The machine zero point (M) is determined by the machine
manufacturer and cannot be changed. On turning machines
point is usually set on the spindle flange.
The work piece zero point (W) is specified by the programmer
and should always be chosen according to the dimensioning
of the drawing. For turning work it lies mostly on the turning
axis and the right hand planar face.
The reference point (R) is approached for initializing the path
measuring system, which means that at this point all axes are
set to zero. This is necessary since generally speaking the
machine zero point cannot be approached.
17Prepared by V.S.Bhati & Akash Shukla
18. AXIS NOMENCLATURE
From work piece zero point
Moving left (towards spindle) Z-ve
Moving right (away from spindle)Z+ve
Moving above spindle center line X+ve
Moving below spindle center line X–ve
18Prepared by V.S.Bhati & Akash Shukla
56. Measuring Instrument
Steel Rule
The steel rule is a basic measuring tool. Steel rule is an accurate
measuring device. Steel rules come in many sizes and formats.
Basic 15cm,30cm,60cm & 100cm
Least Count 0.05mm
1mm – 1000 micron
1cm – 10 mm
1 Meter – 100 cm
1 inch – 25.4 mm
1 inch – 2.54 cm
56Prepared by V.S.Bhati & Akash Shukla
60. Bore gauge
A bore gauge is a convenient term for the
measuring or transfer tools that are used in
the process of accurately measuring holes. A
dial bore gauge is a special tool, calibrated
in .001 inch (.0025 centimeter) or .0001 inch
(.00025 centimeter), which is used to
accurately measure the inside diameter of a
hole, cylinder or pipe. In conjunction with a
micrometer, a bore gauge will give you the
exact reading of a bore size. A typical bore
gauge is comprised of a shaft with a dial
indicator at the top and a measuring sled at
the base. The measuring sled consists of
three guides and an actuating plunger. Dial
bore gauges give you quick and accurate
readings on the size, less than perfect
roundness or wear. 60Prepared by V.S.Bhati & Akash Shukla
61. Bore gauge
Dial indicator (distance amplifying instrument)
A measuring instrument with a contact point attached to a spindle and gears
that moves a pointer on the dial. Dial indicators have graduations that are
available for reading different measurement values.
How to use a dial bore gauge:
1. Zero the gauge. This is accomplished by measuring across the gauge with
an outside micrometer set to the precise bore size. When the zero aligns
with the needle you're ready.
2. Insert the gauge into the bore to the depth you need. Rock it back and forth
until it's properly inserted in the pipe.
3. Look at the reading. This is the lowest reading, which is taken when the
gauge is square on the bore, and the indicator needle reverses its direction.
It can be either more or less than the zero mark, and will indicate an oversize
or undersize bore
61Prepared by V.S.Bhati & Akash Shukla
62. Bore gauge
Type Of Dial Gauges :
• Plunger Type Dial Gauges
• Lever Type Dial Gauges
Plunger Type Dial Gauges:-
This is a type of sturdy dial gauge and
is provided with tolerance pointers.
Moreover, our gauges have smooth
and strong metal bezel. Our gauges
are also fitted with swiss brass bush
bearings. The other features of
these gauges are mentioned below:
62Prepared by V.S.Bhati & Akash Shukla
63. List of Address Codes
63Prepared by V.S.Bhati & Akash Shukla
64. LIST OF G CODES
64Prepared by V.S.Bhati & Akash Shukla
65. List of Canned Cycle
65Prepared by V.S.Bhati & Akash Shukla
66. G00 (Rapid Traverse)
The G00 code executes a non cutting movement, at a rapid movement
A G00 command is written in the following format:
G00 X _ _ Z _ _ ;
where,
X - X axis co-ordinate values (Diameter of Work piece)
Z - Z axis co-ordinate values (Length of Work piece)
66Prepared by V.S.Bhati & Akash Shukla
67. G01 (Linear Interpolation)
The G01 code executes a cutting movement following a straight line, at a set federate
A G01 command is written in the following format:
G01 X _ _ Z _ _ F _ _ ;
where,
X - X axis co-ordinate values (Diameter of Work piece)
Z - Z axis co-ordinate values (Length of Work piece)
F – Feed rate
Note:
Programmed in absolute values as X and Z,
or
Incremental values as U and W are the X,
and Z axis co-ordinate values
67Prepared by V.S.Bhati & Akash Shukla
68. G02 / G03 (Circular Interpolation)
The G02 code use for cutting a clockwise circular path, at a set federate in a radius
The G03 code use for cutting anticlockwise circular path, at a set federate in a radius
A G02 command is written in the following format:
G02 X _ _ Z _ _ R _ _ F _ _;
A G03 command is written in the following format:
G03 X _ _ Z _ _ R _ _ F _ _;
Absolute position (X, Z), the value is the dimension of the end point of the arc
Incremental position (U, W), the co-ordinate of the end point is the distance the tool
moves from the start position of the arc
68Prepared by V.S.Bhati & Akash Shukla
71. M Codes
M00 (Program Stop):
When the machine controller reads the code M00 within a block, it halts the program
The [CYCLE START] key must be pressed to allow the program to continue
M01 (Optional Stop):
The M01 code performs the same function as the M00 code (program stop), except
the machine controller only recognizes the signal to halt the program if the optional
[STOP] input key is activated
M03 (Spindle Rotation in Clock Wise ):
Clockwise rotation of the spindle
The spindle Rotation command is input stating the program
M04 (Spindle rotation in counter clock wise ):
Counter clockwise rotation of the spindle
The spindle Rotation command is input stating the program
71Prepared by V.S.Bhati & Akash Shukla
72. M Codes
M05 (Spindle Stop):
The M05 code, to stop the spindle rotating, is activated at the end of the block in which
it is programmed, i.e. , after any axis movement
M06 (Automatic Tool Change):
This code activates the machine turret and is followed by the code T_ _ _ _,
instructing it to move to the stated tool number
For example, M06 T0303 ;
This command is read change automatically from the current tool number to tool
number 3
M08 (Coolant On):
This code switches the coolant pump on
M09 (Coolant Off):
This code switches the coolant pump off
72Prepared by V.S.Bhati & Akash Shukla
73. M Codes
M19 (Spindle Orientation)
This Code Lock the Machine spindle
It is use when we change jaw of Machine
M30 (Program Stop and Reset):
This code stops the running program
Control is then reset back to the beginning of this program
The program will be reset back to the stated block number
The M30 code also acts as an M05 and M09
73Prepared by V.S.Bhati & Akash Shukla
74. G20 / G21(Inch/Metric Data Input)
The machine controller can be programmed in either Imperial (inch) unit input (G20) or
Metric (millimeter) unit input (G21). The standard format for a CNC part program is to
write the G20 or G21 code in the Starting block of the program
74Prepared by V.S.Bhati & Akash Shukla
78. Tool Compensation Number
1. Back Boring Tool
2. Boring Tool
3. Right Hand Turning Tool
4. Left Hand Turning Tool
5. Back Facing Tool
6. ID Grooving Tool
7. Facing Tool
8. OD Grooving Tool
9. For Centre of Work Piece 78Prepared by V.S.Bhati & Akash Shukla
80. G50 (Max. Spindle Speed)
G50 S_ _ _ _ specifies the maximum spindle speed for constant
surface speed control, measured in R.P.M.
Format to specify the address
G50 S_ _; (specified Maximum Spindle Speed)
80Prepared by V.S.Bhati & Akash Shukla
81. G96 (Constant Surface Speed Control)
If surface speed is set after the address S __ , the spindle speed is calculated so that
the surface speed is always the specified value in relation to the tool positioned
A G96 command for surface speed control is written in the following format:
G96 S __ ;
where,
S __ is the spindle speed (mm/min or inch/min)
81Prepared by V.S.Bhati & Akash Shukla
82. G97 (Constant Surface Speed Control Cancel)
The G97 command allows a spindle for constant surface speed control cancel speed
written in the units, revs per minute
A G97 command for spindle speed control is written in the following format:
G97 S __ ;
where,
S __ is the spindle speed, written in the format revs per minute
82Prepared by V.S.Bhati & Akash Shukla
83. G98 (Feed per minute)
The G98 command allows a federate written in the units, millimeters per minute or
inches per minute, to be entered into the machine controller
G98 commend input in starting the program
83Prepared by V.S.Bhati & Akash Shukla
84. G99 (Per Revolution Feed)
The G99 command allows a federate written in the units, millimeters per revolution or
inches per revolution, to be entered into the machine controller
G99 command input at starting the program
84Prepared by V.S.Bhati & Akash Shukla
85. How to Calculate Spindle Speed
Vc = ╥DN/1000
N = Vc x 1000/ ╥ D
Vc = Cutting Speed
D = Diameter of Work piece
N = Spindle Speed
╥ = 3.14
85Prepared by V.S.Bhati & Akash Shukla
86. How to Calculate Spindle Speed
Vc = ╥DN/1000
N = Vc x 1000/ ╥ D
Vc = Cutting Speed
D = Diameter of Work piece
N = Spindle Speed
╥ = 3.14
For M.S. Dia. 30 mm
O65646;
G99 G21;
G28 U0.0 W0.0;
T0101;
G96 S250 M04;
G50 S2500;
G96 :- Minimum Spindle Speed
G50 :- Maximum Spindle Speed
N=250x1000/3.14x30
2500 RPM
86Prepared by V.S.Bhati & Akash Shukla
94. Program Format
O1000; Program No.
G21 G99; Program parameter
G28 U0.0 W0.0; Home Position
T0101; Tool No.
M03 S800; Spindle Rotation
M08; Coolant ON
G00 X35.0 Z5.0; Near to Work Piece
G00 X30.0 Z1.0; Touch to Work Piece
;Canned Cycle
;Work Piece Coordinate
G00X50.0; Distance From
G00Z10.0; Work piece
M05; Spindle Stop
M09; Coolant OFF
G28U0.0W0.0; Home Position
M30; Program End
94Prepared by V.S.Bhati & Akash Shukla
99. G71 (Stock Removal in X Axis)
The G71 code commands a multiple repetitive cycle, sometimes referred to as a
canned cycle
This G71 cycles are used within a CNC program to simplify programming, since only
the dimensions describing the required component profile are required. The CNC
control will then generate the roughing cuts needed to make this component profile,
from within its own memory.
Format:
G71 U_ _R_ _
G71 P_ _Q_ _U_ _W_ _F_ _
where,
U is the depth of cut in the X axis (Radius value)
R is the escaping amount (Retract)
P is the start block number finished shape.
Q is the last block number finished shape.
U is the finishing allowance in the X axis (Diameter value).
W is the finishing allowance in the Z axis.
F is the federate for Roughing
99Prepared by V.S.Bhati & Akash Shukla
119. G72 (Stock Removal in Facing)
The G72 code commands a multiple repetitive cycle. The G72 cycle is similar to the
G71 cycle except that the cut is applied in the Z axis
A G72 command is written in the following format
G72 W _ _R _ _
G72 P_ _Q _ _U _ _W _ _F _ _
where,
W is the depth of cut in the Z axis.
R is the Retract amount
P is the start block number finished shape.
Q is the last block number finished shape.
U is the finishing allowance in the X axis (Diameter value).
W is the finishing allowance in the Z axis.
F is the federate for Roughing
119Prepared by V.S.Bhati & Akash Shukla
123. G73 (Pattern Repeating)
The function of the G73 canned cycle is to permit the cutting of a programmed profile
repeatedly. It is mainly used for machined parts where the rough shape has already
been formed by either rough machining, forging or casting
G73 U _ _W _ _R _ _;
G73 P _ _Q _ _U _ _W _ _F _ _;
where,
U – X axis distance and direction of relief.
W – Z axis distance and direction of relief.
R – Number of cutting Divisions
P - is the start block number finished shape.
Q - is the last block number finished shape.
U - is the finishing allowance in the X axis (Diameter value).
W - is the finishing allowance in the Z axis.
F - is the federate
123Prepared by V.S.Bhati & Akash Shukla
125. G70 (Finishing Cycle)
After part profile rough cutting has been completed, using the G71, G72 or G73 codes,
the G70 code can be used to perform a finishing cut/pass
A G70 finishing pass command is written in the following format
G70 P _ _Q _ _F _ _
where,
P:- is the start block number of finished shape.
Q:- is the last block number of finished shape.
F:- Feed Rate
125Prepared by V.S.Bhati & Akash Shukla
127. G74 (End Face Peck Drilling Cycle)
The G74 code use for a peck drilling cycle
The drill runs centerline of the X axis and parallel to the Z axis, the
drill will make holes in the face end of the Work Piece
G74 command is written in the following format
G74 R _ _ ;
G74 Z _ _Q _ _ F _ _ ;
where,
R is the peck return amount
Z is the total depth of the hole
Q is the pecking depth in the Z axis measured in micron
F is the feed rate
127Prepared by V.S.Bhati & Akash Shukla
128. Drilling Exercise 01
Drill Dia. – 10.00 mm
Raw Material Size:- Dia.52X70mm
128Prepared by V.S.Bhati & Akash Shukla
133. G90 (Outer / Internal Dia. Cutting
Cycle)
The command G90 performs a one pass cutting cycle, where the cut is applied in the
X axis. Also, by using the command R __ within the G90 block, tapers can be
generated
If the one pass move needs to be repeated, only the values that change need to be
entered in the next block
A G90 command for written in the following format
G90 X __ Z __ F __
where,
X __ Work piece Diameter
Z __ Work Piece Length
F __ is the feed rate
133Prepared by V.S.Bhati & Akash Shukla
135. Taper
The sign of R depends on the cutting direction of path "P1" - in the above program, R
is entered as a minus value
The G90 taper cut command can be used for both internal and external cutting
operations
135Prepared by V.S.Bhati & Akash Shukla
140. G94 (End/Taper Face Turning Cycle)
The G94 command performs a one pass face cutting cycle, where the cut is applied in
the Z axis
If a repartition of the move is required, only the values that change need to be entered
into the next block
A G90 command for written in the following format
G94 X __ Z __ F __
where,
X __ Work piece Diameter
Z __ Work Piece Length
F __ is the feed rate
140Prepared by V.S.Bhati & Akash Shukla
142. G75 (GROOVING CYCLE)
The G75 command use for grooving in the X axis
A G75 command is written in the following format
G75 R _ _;
G75 X (U) _ _Z (W) _ _ P _ _Q _ _R _ _F _ _;
where,
the definitions of R, X (U) , Z (W) , P, Q, R and Fare the same as G74
where,
R is the peck return amount
X (U) is the diameter of the bore if step over is used (i.e., stepping along the X
axis to repeat the peck cycle)
Z (W) is the depth of the bore
P is the step over in the X axis measured in micron's (without sign)
Q is the pecking depth in the Z axis measured in micron's (without sign)
R (2) is the retract move at the base of the groove
F is the federate
142Prepared by V.S.Bhati & Akash Shukla
150. G76 (Multiple Thread Cutting Cycle)
The G76 command contains, within two blocks, all the information required to
generate a standard thread form and pitch
A G76 uses one edge cutting to reduce the load on the tool tip
G76 P (A) / (B) / (C) _ _ _ _ _ _Q _ _R _ _;
G76 X _ _Z _ _P _ _Q _ _F _ _;
In First Block:-
G76 P (A) / (B) / (C) _ _ _ _ _ _Q _ _R _ _;
where,
P (A) is the number of thread finishing passes (1 to 99)
P (B) is the chamfer amount. This is the angle at which the tool leaves at the end of
the thread cutting cycle
P (C) is the angle of the tool tip (80°, 60°, 55°, 30°, 29° and 0°)
Note - (A), (B) and (C) are all specified at the same time by the address P,
Ex, P030060 = number of cuts is 03, chamfer amount of 60 and tool angle of 60°
Q is the minimum cutting depth (in microns)
R is the finishing allowance 150Prepared by V.S.Bhati & Akash Shukla
151. G76 (Multiple Thread Cutting Cycle)
In Second Block:-
G76 X _ _Z _ _P _ _Q _ _F _ _;
where,
X is the end position of the thread in the X axis (the minor diameter)
Z is the end position of the thread in the Z axis
P is the depth of the thread as a radius value (in microns)
Q is the depth of the first pass as a radius value (in microns)
F is the size of the thread Pitch
Minor Diameter
Calculation
d= Minor Diameter
D= Major Diameter
P=Thread Depth
d= D-2(P)
Thread Depth(P) = 0.6 x Pitch of Thread
Some Times
For Fine Thread 0.65
For Taper Thread:-
R=D-d/2
R – Taper
D – Major Dia.
d – Minor Dia.
151Prepared by V.S.Bhati & Akash Shukla
153. Threading Exercise 02
O0033; Threadding M20x1.5
G28 U0.0 W0.0;
T0101;
G97 M04 S400;
M08;
G00 X30.0 Z10.0;
G00 X25.0 Z3.0;
G76 P010060 Q100 R0.05;
G76 X18.2 Z-40.0 P900 Q300 F1.5;
G00 X30.0;
G00 Z10.0;
M05;
M09;
G28 U0.0 W0.0;
M30;
%
M20 x 1.5
Length 40mm
Thread Depth(P) = 0.6 x Pitch of Thread
= 0.6 x 1.5
= 0.9 mm
Minor Diameter Calculation
d= Minor Diameter
D= Major Diameter
P=Thread Depth
d = D - 2 (P)
= 20 – 2 (0.9)
= 20 - 1.8
= 18.2 mm
153Prepared by V.S.Bhati & Akash Shukla
154. G92 (Thread Cutting Cycle)
The G92 command performs a one pass threading cycle. Only the X (U) axis moves
need to be entered in subsequent blocks, after the original read-in of the G92
command
A G92 command for straight thread cutting is written in the following format
G92 X _ _Z _ _ F (Pitch) _ _R _ _;
where,
F Pitch of thread (federate)
Minor Diameter
Calculation
d= Minor Diameter
D= Major Diameter
P=Thread Depth
d= D-2(P)
Thread Depth(P) = 0.6 x Pitch of
Thread
Some Times
:- For Fine Thread = 0.65 x Pitch of
Thread
For Taper
Thread:-
R=D-d/2
R – Taper
D – Major Dia.
d – Minor Dia.
154Prepared by V.S.Bhati & Akash Shukla
164. Safety Symbol
No Smoking. Wear hand protection.
Caution, risk of electric shock. First aid point.
164Prepared by V.S.Bhati & Akash Shukla
165. Workshop Safety Rules
Before you can use equipment and machines or attempt practical work in a workshop you
must understand basic safety rules. These rules will help keep you and others safe in the
workshop.
1. Always listen carefully to the teacher and follow instructions.
2. Do not run in the workshop, you could cause an accident.
3. Know where the emergency stop buttons are positioned in the workshop. If you see an
accident at the other side of the workshop you can use the emergency stop button to turn off
all electrical power to machines.
4. Always wear an apron as it will protect your clothes and hold loose clothing such as ties in
place.
5. Wear good strong shoes. training shoes are not suitable.
6. When attempting practical work all stools should be put away.
7. When learning how to use a machine, listen very carefully to all the instructions given by
the teacher. Ask questions if you do not fully understand.
8. Do not use a machine if you have not been shown how to operate it safely by the teacher.
9. Keep hands away from moving/rotating machinery.
10. Use hand tools carefully, keeping both hands behind the cutting edge.
11. Report any damage to machines/equipment as this could cause an accident.
165Prepared by V.S.Bhati & Akash Shukla