NUMERICAL CONTROL (NC)
Numerical control is a form of programmable
automation in which a machine is controlled
by numbers ( Letters and other Symbols) that
have been coded on punched paper tape
(Punch Card).
The initial application of Numerical Control
was in the machine tool industry, to control
the position of a cutting tool relative to
the work part being machined.
•The concept of Numerical Control was
proposed in the late 1940s by John Parsons
who recommended a method of automatic
machine control that would guide a milling
cutter to produce a curvilinear motion in order
to generate smooth profiles on the work -
pieces .
•The main components of NC was Punch tape,
Machine control unit and Machine tool.
COMPONENTS OF NC MACHINE
•The NC part program represents the set of
machining instructions for the particular part.
• The coded numbers in the program specify x-
y-z coordinates, defining the various positions
of the cutting tool in relation to the work part.
•By sequencing these positions in the program,
the machine tool is directed to complete the
machining of the part.
ADVANTAGES OF NC SYSTEM OVER
TRADITIONAL METHODS OF PRODUCTION
Better control of the tool motion under
optimum cutting conditions.
Improved part quality and repeatability.
Reduced tooling costs, tool wear, and job
setup time.
Reduced time to manufacture parts.
Reduced scrap.
Better production planning.
DISADVANTAGES OF NC SYSTEM
The main disadvantage of the NC system was,
there is no any facility for error correction in
programming.
If there is any small change in the machining
process is required, then the entire set of
Punch tape has to be changed.
Punch tape can be used only for one time,
because NC system has no any memory unit.
It was less flexible and more time consuming
in comparison with CNC system
.
DIRECT NUMERICAL CONTROL (DNC)
In a Direct Numerical Control system
(DNC), a mainframe computer is used to
coordinate the simultaneous operations of a
number of NC machines.
The main tasks performed by the computer
are to program and edit part programs as
well as download part programs to NC
machines
•Machine tool controllers have limited
memory and a part program may contain few
thousands of blocks.
•So the program is stored in a separate
computer and sent directly to the machine,
one block at a time.
COMPUTER NUMERICAL CONTROL
(CNC)
Computer numerical control (CNC) is a
numerical control system in which a dedicated
computer is used into the control unit to
perform basic and advanced NC functions.
CNC controls are also known as softwired NC
systems because most of their control
functions are implemented by the software
programs.
CNC is a computer assisted process to control
general purpose machines from instructions
generated by a processor and stored in a
memory system.
APPLICATIONS OF CNC SYSTEM
•CNC milling and machining centers
•CNC lathes and turning centers
• CNC Electrical Discharge Machining (EDM)
• CNC cutting machines (laser, plasma,
electron, or flame)
• CNC fabrication machines (sheet metal
punch press, bending machine, or press brake)
•CNC grinding machines
•CNC welding machines
BASIS FOR
COMPARISON
NC CNC
Input mechanism Punched tapes or
punched cards
Program is fed with
the help of the
computer
Modification in the
machine programs
Done by changing the
punched cards.
Done by using a
computer software
Error correction Not possible Possible
Memory to store
instructions
Not available Memory storage is
present in the
computer
DIFFERENCE BETWEEN NC & CNC SYSTEM
Cost Less expensive Highly expensive
Maintenance
required
Low High
Accuracy NC is moderately
accurate
Extensively
accurate
Operators Must be highly
skilled
Not much skills are
required
Flexibility Less flexible More flexible
Time
consumption
Requires more
time in production
Needs less time
In production
CNC PROGRAMMING
CNC programming is where all the machining
data are compiled and the data are translated
into a language which can be understood by the
control system of the machine tool.
The machining data is as follows:
•Machining sequence classification of process,
tool start up point, cutting depth, tool path etc.
•Cutting conditions spindle speed, feed
rate, coolant, etc.
• Selection of cutting tools.
A CNC program consists of addresses , words and
blocks.
a. Address
The identification letter at the beginning of each
word is called address such as N, G, X,Y,Z, M,F ,T etc.
b.Word
A word is composed of an identification letter and a
series of numerals, e.g. the command for a feed rate
of 200mm/min is F200.
c. Block
• A block is composed of one or more words.
• A command given to the control unit is called
a block.
FUNCTION
Sequence number
Preparatory function
Co ordinate Letter
Parameters for Circular
Interpolation
Feed function
Spindle function
Tool function
Miscellaneous function
N
G
X, Y, Z
I, J, K
F
S
T
M
ADDRESS
SEQUENCE NUMBER (N ADDRESS)
•A sequence number is used to identify the
block.
•It is always placed at the beginning of the block
and can be regarded as the name of the block.
•It is program line number. Eg: N01, N02…
•It is a good practice to increment each
block number by 5 to 10 to allow additional
blocks to be inserted if future changes are
required. Eg – N05, N10….
•A preparatory function determines how the
tool is to move to the programmed target.
•Preparatory function ,used as a
communication device to command the
MCU.
•The most common G addresses are listed
above.
PREPARATORY FUNCTION
(G ADDRESS OR G CODES)
• G 41 - TOOL RADIUS COMPENSATION
LEFT
•
•G 42 - TOOL RADIUS COMPENSATION
RIGHT
•G 80 – CANNED CYCLE CANCEL
•G 81 – 89 – CANNED CYCLE
• G 90 - ABSOLUTE DIMENSIONING
• G 91 - INCREMENTAL DIMENSIONING
• G 92 – PRESET (HOME)
• G 94 – FEED IN MM/MINUTE
• G 95 – FEED IN MM/REVOLUTION
CO-ORDINATE WORD
(X/Y/Z ADDRESS)
•A co-ordinate word specifies the target point of
the tool movement (absolute dimension system)
or the distance to be moved (incremental
dimension).
•The word is composed of the address of the axis
to be moved and the value and direction of the
movement.
EXAMPLE
X100 Y200 Z-10
•Represents the movement of tool to the co-
ordinates (100, 200,-10) on the workpiece .
•Whether the dimensions are absolute or
incremental will have to be defined previously
(using G90 or G91).
PARAMETER FOR CIRCULAR
INTERPOLATION
(I/J/K ADDRESS)
•These parameters specify the distance measured
from the start point of the arc to the centre.
• Numerals following I, J and K are the X, Y and Z
components of the distance respectively.
SPINDLE FUNCTION
(S ADDRESS)
•The spindle speed is commanded under an S
address .
•It is always in revolution per minute.
•Eg – S1000
FEED FUNCTION
(F ADDRESS)
•The feed is programmed under an F address
except for rapid traverse.
•The unit may be in mm per minute (in the case
of milling machine) or in mm per revolution (in
the case of turning machine).
•The unit of the feed rate has to be defined at
the beginning of the program.
TOOL FUNCTION
T ADDRESS
Tool selection.
The T code specifies which tool is to be used
in a specific operation.
Example: T02 - represents tool number 2
MISCELLANEOUS FUNCTION
(M ADDRESS / CODES)
The miscellaneous function is programmed to
control the machine operation other than for
co- ordinate movement.
The most common M functions are listed above :
M CODES
M 00 - PROGRAM STOP
M 01 – PLANNED STOP
M02 – END OF PROGRAM
M 03 – SPINDLE ROTATION CLOCKWISE
M 04 – SPINDLE ROTATION ANTI -
CLOCKWISE
M 05 – SPINDLE STOP
•M 06 – TOOL CHANGE
•M 07 – COOLANT ON (MIST)
•M 08 – COOLANT ON (FLOOD)
•M 09 – COOLANT OFF
•M 30 – END OF MAIN PROGRAM
(RESET)
•M98 – SUBPROGRAM/SUBROUTINE
CALL
• M99 – END OF
SUBPROGRAM/SUBROUTINE
M CODES
G 00 – RAPID POSITIONING
G 00 – This code is used to command the cutter
(tool) to move from the existing point (home
position) to the target point at the fastest speed of
the machine
G 01- LINEAR INTERPOLATION
This code is used to command the cutter to move
from the one point to the another point along a
straight line (linear cutting of the workpiece) at
the speed designated by the F address.
G02/G03 – CIRCULAR INTERPOLATION
These codes are used to command the cutter to
move from the one point to the another point
along a circular arc either in clockwise direction
(G02) or in counterclockwise direction (G03).
In this case, along with the target point, the radius
or the centre of the arc is also required.
The parameters of the centre of the circular arc is
designated by the I, J and K addresses. I is the
distance along the X axis, J along the Y, and K along
the Z.
(Xc, Yc)
End point
Y I
J
Start point
(Xs, Ys)
X
FIG – G 02 - CIRCULAR INTERPOLATION - CLOCKWISE
I (XC - XS)
J (YC - YS)
(Xc, Yc)
Start point
(Xs, Ys)
End point
Y I
J
X
FIG – G 03- CIRCULAR INTERPOLATION -
COUNTERCLOCKWISE
G 18 : XZ PLANE SELECTION
G 19 : YZ PLANE SELECTION
(G40/G41/G42)
CUTTER RADIUS COMPENSATION
Cutter compensation is an offset or shift from
center line of the tools to the cutters edge along a
programmed path.
The advantage of cutter compensation is the use
of geometry based offsets rather than tool center
point, allowing for the same program to use
different diameter tools.
•If the cutter is on the left of the contour, G41 is
used.
•If the cutter is on the right of the contour, G42 will
be used.
•G40 is to cancel the compensation calculation.
(G 80-89) - CANNED CYCLE
A canned cycle is a combination of machine
movements that perform machining
operation like drilling, milling, boring and
tapping.
This cycle simplifies the program by using a
single block with a G-code to specify the
machining operations usually specified in
several blocks.
This cycle is also called as fixed cycle
• In programming point to point operation, to
write the repetitive information is very time
consuming task.
• This can be overcome by using the fixed
cycles, here once the drilling cycle is called
,then the only one step required i:e - to input
the position of holes .
• The machine controller repeats the drilling
cycle until it is cancelled by the G 80 code.
•A number of identical holes may share the
same starting point, same feed rate and the
same depth, only the X and Y coordinates are
different for each hole on the part.
•The specified values become fixed for the
whole duration of the cycle and do not have to
be repeated, unless there is a change in them.
G 81 – DRILLING CYCLE
SYNTAX FOR G 81
G81 X... Y... Z... R... K... F...
Where….
X Hole position in x-axis.
Y Hole position in y-axis.
Z Depth, tool will travel with feed to Z-
depth.
R Position of the R plane.
K Number of cycle repetitions (if required)
F Feed rate.
Working
Here is briefly described how G81 drilling cycle operates,
1- Rapid traverse to the specified x,y axis position (drilling position).
2- Rapid traverse to the R plane position.
3- Drilling with specified Feed from R-plane position to Z-depth position.
4- Rapid traverse to Initial level or R-plane depends on G98, G99 modes
PART PROGRAM WITH CANNED CYCLE
N01 G71 G 90 G94
N02 M03 S1000 M08
N03 G00 X0 Y0 Z7
N04 G81 X10 Y10 Z-8 R1 F200
N05 Y20
N06 X50
N07 Y30
N08 G80 G 99 M02
N09 M05 M09
SUBROUTINES
Subroutines or subprograms or mini-
programs are a powerful time saving
technique.
The subroutine provide the capability of
programming certain fixed sequence or
frequently repeated patterns.
Subroutines are actually an independent
program with all the features of a usual part
program.
• Subroutines are stored in the memory under
separates program number.
• Whenever a particular feature is required
within the program the associated subroutine
is called for execution.
• The subroutine may be called any time and
repeated any numbers of time.
•After execution of subroutines the control
return to main program.
•To describe and use a subroutine, the
following information is required in the form
of codes and symbols.
Calling the subroutine (M 98)
Identification of subroutine (by subroutine
ID, Eg – P1010)
Repetition of subroutine (by using letter L)
End of subroutine/ Return to main program
(M 99)
PART PROGRAM WITH SUBROUTINE
01000 ;
N01 G71 G 90 G94
N02 M03 S1000 F200 M08
N03 M98 P01010
N04 G92 M05 M09
N05 M02