Introduction to
Numerical Control
(NC) Machines
Dr.Deepesh patidar
Assistant Professor
Department of Mechanical Engineering
DIT University
Conventional Lathe
machine
Conventional Milling
machine
Numerical Control
machine
Programmable automation in which the mechanical
actions of a ‘machine tool’ are controlled by a
program containing coded alphanumeric data that
represents relative positions between a cutting tool and
a work part.
Program Machine
Instructions Control Unit
Transformation
Process
P
o
w
e
Difference between
Conventional m/c & NC
m/c Convention NC
Item
al machine
machine
1. Movement Acme screw Ball screw
2. Feed manual motor
3.measureme manual Linear scale
nt
Control System
Open and Closed loop
Direct Numerical Control
Direct numerical control (DNC) –
control of multiple machine tools
by a single (mainframe)
computer through direct
connection and in real time
– 1960s technology
– Two way communication
DNC – contd.,
Central
Computer NC Prgrm
Computer Network
Machine Machine Machine
Control Unit Control Unit Control Unit
1 2 3
Transformation
Process
Computer
Numerical Control
(CNC) Machines
Basic CNC Principle
Photography of CNC
turner
Photography of CNC
miller
Motion Control methods
Point-to-Point systems
Also called position systems
System moves to a location and
performs an operation at that location
(e.g., drilling)
Also applicable in robotics
Continuous path systems
Also called contouring systems in
machining
System performs an operation during
movement (e.g., milling and turning)
Interpolation methods
1. Linear interpolation
– Straight line between two
points in space
2. Circular interpolation
– Circular arc defined by starting
point, end point, center or
radius, and direction
3. Helical interpolation
– Circular plus linear motion
4. Parabolic and cubic interpolation
– Free form curves using higher
order equations
Absolute vs. Incremental
Positioning
Absolute positioning
Move is: x = 40, y =
50
Incremental
positioning
Move is: x = 20, y =
30
Coordinate Systems
For flat and prismatic (block-like) parts:
Milling and drilling operations
Conventional Cartesian coordinate
system
Rotational axis about each linear axis
For rotational parts:
Turning operations
Only x- and z-axis
Axes on Lathe machine
tool
Contd.,
Axes on Milling machine
tool
Contd.,
Classifications
Based on Machine centre:
Turn mill centre / Vertical mill
centre
Based on Motion Type:
Point-to-Point / Continuous
path
Based on Control
Loops: Open loop /
Closed loop
Based on Input
power:
Electric / Hydraulic /
Constructional features of
CNC
The tool / work part (table) moves
Tools can operate in 1-5 axes
Larger machines have a machine control unit
(MCU) which manages operations
Movement is controlled by servo motors
(actuators)
Feedback is provided by sensors (transducers)
Tool magazines are used to change the
tools automatically
Relative movementof tool with
the workpiece or respect to
vice versa can be guided
controlled by a Part and
program
Feed control system
Machine Control Unit
Components and its
Functions
On board computer
Feed drive
Measuring system
Work spindle / Work
table
Cooling system
Tool magazine (Turret)
On board computer
Feed drive
Tab
L e a d s c re le
E n c o dwe A / C M o to
r r ~
S e rv o C o n tro
lle r
C o u n te C o m p a ra
r to r
In p u t ( c o n v e r fro m a n a lo g to d ig ita l v a
te d lu e )
Recirculating ball
mechanism
Measuring System
Direct Position
measuring
Contd.,
Indirect Position
measuring
Rotary encoder
Work Spindle
Work table
Cooling System
Tool Magazine
Single Turret
Chain Turret
CNC Part Programming
Part program is a sequential
set of instructions
Storage of more than one part
program
Various forms of program
input
Program editing at the machine
tool (on board computer )
Fixed cycles and programming
subroutines
Communications interface
Benefits of
CNC
Cycle time reduction
Nonproductive time
reduction
Greater accuracy and
repeatation
Reduced parts and
Lower scrap
inventory rates
space floor
Operator skill-level
reduced
Limitations of CNC
High machine cost
Complicated maintenance
Skill & training are required
for programming and maintenance
High tooling cost
Temperature, humidity & dust
must be controlled
CNC Application
Characteristics
Batch and High Volume
production
Repeat and/or Repetitive orders
Geometry and dimensional
accuracy
Good surface finish
Complex part geometries
Many separate operations on one
part
Applications of CNC
CNC PART
PROGRAMMING
Introduction
Part Programme is a set of instructions
which instructs the machine tool about
the processing steps to be performed for
the manufacturing a component
Part programme is an important part of
the CNC system
The shape of manufactured
components will depends on how
correctly the programme has been
prepared
The part programme is transferred to as
one of the input medium which
instruct the CNC machine
Types of programming
NC coding
Manual part
programming
Automatic Part
Programming
Languages:
– APT
– UNIAPT
– COMPACT II
– FORTRAN
Manual Part
Programming
Binary code decimal system (BCDS)
Bit - 0 or 1 => absence or presence of
hole in the tape which is in MCU
Character - row of bits across the
tape (smallest unit / digit)
Word - sequence of characters
(combination of alpha-numerical
characters)
Block - collection of words to form one
complete instruction (logical order of
processing)
Part program - sequence of
Block Format
The organization of words within a block in
NC part program
Word address format - used on all modern
CNC controllers
– Uses a letter prefix to identify each type of
word
– Spaces to separate words within the block
– Allows any order of words in a block
– Words
change fromcanthe be
previous
omitted if their values
do
blocknot between
– A new blocks can two
be inserted existing blocks
Example Format
Instruction
Codes
A part program consists the following words:
N, G, X, Y, Z, I, J, K, F, S, T, R, M
N - sequence number prefix (to identify the
block) G - preparatory functions (to prepare
the controller)
– Example: G00 - rapid transverse move
X, Y, Z - prefixes for x, y, and z-axes (position &
motion ) I, J, K – Interpolation parameters
F - feed rate (to specify the feed)
S - spindle speed (to specify the seed)
T - tool selection (for ATC only)
R – arc radius (to specify the tool radius in drill
cycles)
M - miscellaneous functions (to specify auxiliary
Elements of Part
program
Preparatory functions: which unit, which
interpolator, absolute or incremental
programming, which circular interpolation
plane, cutter compensation, etc.,
Coordinates: 3 translational and 3 rotational
axis
Machining parameters: feed, and speed
Tool control: next tool number, tool change
Cycle functions: canned cycle, drill cycle,
ream cycle, bore cycle, mill cycle
Miscellaneous functions: coolant on/off,
spindle on/off, programme rewind, spindle
rotation direction, etc.,
G-Codes
M-Codes
Machine and Tool offset
Difficult to place a vise in the exact same
position on the machine each time
The distance from home to the WCS is
usually not known until the vise is set and
aligned with the machine
Different tools extend out from the machine
spindle with different lengths
If the tool wears or breaks, tool must be
replaced, it is almost impossible to set it the
exact length out of the tool holder each time
Therefore, there must be some way to relate the
(MCS) machine coordinate system to the WCS
and take into account varying tool lengths
This is done using reference points
Reference Points
Machine Origin
The machine origin is a fixed point set
by the machine tool builder
Usually it cannot be changed
Any tool movement is measured from this
point
The controller always remembers
tool distance from the machine origin
Contd.,
Program Origin
It is also called home position of the tool
Program origin is point from where the tool
starts for its motion while executing a
program and returns back at the end of
the cycle
This can be any point within the workspace
of the tool which is sufficiently away from
the part
Contd
., Part Origin
The part origin can be set at any point
inside the machine’s electronic grid
system
Establishing the part origin is also known
as zero shift, work shift, floating zero or
Usually part origin needs to be defined eac
datum h
for new setup
Zero shifting allows the relocation of
the part
Sometimes the part accuracy is affectedby
the location of the part origin
Contd.,
Contd.,
Tool Pre-setter
Structure of program
Exercise: 1 (Drilling)
Write a CNC part program to drill
two holes of diameter 10 mm in a
30 mm
5mm thick mild steel plate as
shown in fig.
30 mm
(Diagram not to scale)
90 mm
30 mm
30 mm
90 mm
Location of Reference
point
Process plan
Part Program
Block 1: O0001;
Block 2: N01 G17 G21 G80 G90 G94;
Block 3: N02 G00 X0, Y0, Z10;
Block 4: N03 X30, Y30;
Block 5: N04 G01 X70 Y30 S800 M03;
Block 6: N05 Z-7 F0.3 M08;
Block 7: N06 Z2;
Block 8: N07 G00 Y60;
Block 9: N08 G01 Z-7 F0.3;
Block 10: N09 Z2;
Block 11: N10 G00 X0 Y0 Z10 M05 M09;
Block 12: N10 M02;
Canned Cycle
Cutter Offset
Cutter path must
be offset from
actual part outline
by a distance
equal to the
cutter radius
Write the part program for drilling holes in the mild steel plate of
thickness 20 mm as shown in figure 1 (diagram not to scale)
and assume the parameters such as speed, feed, depth of cut
etc.
Exercise 2
Write an efficient CNC
part program to drill 35
holes of diameter of
0.5 inch each in a
machine component as
shown in the figure.
The raw material to
be employed is mild
steel plate of 0.4 inch
thickness.
Part Program
Explanation
Block 1:
It indicates the start of the program.
Block 2:
It specifies the program number and ID. It is usually a alpha-
numerical code and always start with an alphabet ‘O’.
Block 3:
It sets the entry of dimensional units in Imperial format.
Block 4:
G17: It selects the plane of operation as X-Y plane
G40, G80, G49 are used to cancel all usual cycle that might
have left in on-mode during the execution of last CNC code.
G90 selects the method of specifying dimensions between
features as ‘absolute’.
Contd.,
Block 5:
It sets the program zero on the work part.
There are three major environments in programming that
require an established mathematical relationship.
Machine: machine tool and control
system Part: Workpiece + Drawing +
material Tool: Holder + Cutting tool
The location coordinates of the program zero with respect to
the machine reference zero must be communicated with the
MCU so that the MCU will convert the part program in to
required signals to control the machine tool.
This can be achieved by using a Preparatory code ‘G92’. The
syntax of G92 is as follows:
G92 X… Y… Z…
Contd.,
Block 6:
Replace the existing cutting tool with tool number 1.
Block 7:
Rapid travel of tool from home position to a reference
position: hole with coordinates X1.7 Y2.4.
Switch on the spindle rotation with speed of about 900
rpm.
Block 8:
Approach to a safe position at Z = 1.0 rapidly.
Meanwhile the tool length compensation is activated by
using G43. It is used to communicate the length of tool
registered in register number H01 to the MCU. Switch
on the coolant flow.
Contd.,
Block 9:
In the given task, number of holes is to be drilled.
For this purpose a special function or cycle is used. It
is called as drilling canned cycle.
Its syntax and meaning are shown below.
The number of motions/action elements of drilling
operations is specified only at once.
Later only the locations of holes to be drilled are
given to the MCU.
Contd.,
Block 10:
It suggests the distance of next location of the
hole. It is also suggested to carry out the same
drilling operation 6 times along the Y-axis with an
increment of 2.1.
Block 11:
Drill the hole at increment of 1.8 along X-
direction.
Block 12:
Carry out the drilling operation 6 times along
the Y-axis with decrement of 2.1.
Block 13:
Drill the hole at increment of 1.8 along X-
Contd.,
Block 14:
Carry out the drilling operation 6 times along the Y-axis with
increment of 2.1.
Block 15:
Drill the hole at increment of 1.8 along X-direction.
Block 16:
Carry out the drilling operation 6 times along the Y-axis with
decrement of 2.1.
Block 17:
Drill the hole at increment of 1.8 along X-direction.
Block 18:
Carry out the drilling operation 6 times along the Y-axis with
increment of 2.1.
Block 19:
Cancel the canned cycle and switch off the coolant flow.
Contd.,
Block 20:
Stop the spindle and go to safe position along
Z direction at 0.0.
Block 21:
Go to home position via X= 0 and Y=0.
Block 22:
Stop the program from execution.
Block 23:
End the program.
Exercise 3 (Turning)
Part program
Automatic part
programming
Define
Tool
CNC
data
Make 3D model
Simulate
cutting
*** All the best
***