2. Brief history
1942 Bendix Corporation, a USA helicopter blade manufacturing company,
needs three-dimensional cam parts.
Coordination of movements is necessary.
1947 John Parson (a Bendix corporation worker) using punched tapes
is able to control simultaneously axes movements of a machine
MIT collaborates
1953 Numerical Control (NC) term appears at M.I.T.
1970 Computer Numerical Control (CNC) is created
Microprocessors origin.
1980 Direct Numerical Control (DNC) is possible.
A large number of machines are controlled by a computer.
Definition
CNC (Computer Numerical Control (CNC) refers to the method of controlling a machine
tool or the machining process by means of a computer.
Coded numerical instructions are inserted into the CNC
NC Punched Tape
INTRODUCTION
3. INTRODUCTION-Numerical Control (NC)
Numerical Control (NC)
NC (numerical control) machine tools are the machine tool, of which the various functions are
controlled by : letters , numbers and symbols.
The NC machine tool runs on a program fed to it; without human operator. The NC program consist of
a set of instruction or statement for controlling the motion of the drives of the machine tools as well
as the motion of the cutting tool.
4. CNC Machine Tools
In CNC (Computer Numerical Control) machines, a dedicated computer is used to perform the most of
basic NC machine functions.
CNC (Computer Numerical Control) machine is a NC machine which uses a dedicated computer as the
machine control unit.
The entire program is entered and stored in computer memory. The machining cycle for each
component is controlled by the program contained in the computer memory.
Input / Output
Devices
Machine Tool
Memory (ROM) Control
program for : Z Slide
X Slide
Memory (RAM)
Part Program
Feed Back Unit
INTRODUCTION-CNC Machine Tools
5. CNC Machine Tools
INTRODUCTION-CNC Machine Tools
Input / Output Console : It is the unit through which part program is fed to the CNC machine tool
system and required output is taken out. It basically consists of monitor and Keyboard.
Microprocessor : This controller takes input from Input / Output device, Feedback from feedback unit
and actuates the drives as well as the tool of the machine tool.
Memory : It consists of RAM & ROM. The RAM stores part program, while ROM stores the programs
for machine control.
Feedback unit : The feedback unit takes input from machine tool and transfers it to control unit for
necessary corrections.
Machine tool : Machine tool is operated by the control unit.
Interfaces : They are the connections between the different components of the CNC machine tool
system.
6. DNC is a manufacturing system in which a number of machines are controlled by a computer
through direct- connection and in real time.
The configuration of the DNC system can be divided into:
Satellite computers are minicomputers and they serve to take some of the burden off central computer. Each
satellites controls several machine tools.
DNC system without satellite computer.
DNC system with satellite computer.
DNC Machine Tools
INTRODUCTION-DNC Machine Tools
8. Loop control types
OPEN LOOP
INTRODUCTION
It does not have any feedback mechanism.
It only has motion control but do not have any provision for feedback, which is needed to be compared
with input for better control & correction of drive system.
9. Machine control feedback: position & velocity
VIDEO
Loop control types
CLOSED LOOP
INTRODUCTION
It has a feedback mechanism.
It has the motion control with a provision of feedback of feedback.
Which can be used for accurately controlling the drive system by comparing it with the input
information until the required or desired position is achieved.
10. The disk has many circular tracks, the higher the
number of tracks the higher the resolution.
These devices do not lose position when power
is removed (homing sequence not needed on
startup).
They do not accumulate errors (not affected by
noise signal).
They are more complex and expensive.
CNC machine tool description
Feedback devices
ABSOLUTE ROTARY ENCODER
An encoder is a sensor for converting rotary motion or position to
analog/digital signal.
VIDEO
VIDEO
INTRODUCTION
11. CNC machine tool description
Feedback devices
INCREMENTAL ROTARY ENCODER
The feedback signal is always referenced to a start
or home position. They need an external processing
of signals.
In the event of a power failure, it must be
reinitialized.
They are susceptible to noise, thus, errors.
They are simpler and cheaper.
An encoder is a sensor for converting rotary motion or position to
analog/digital signal.
VIDEO
INTRODUCTION
12. 1. The part program is fed to the
machine through the tapes or
other such media.
2.In order to modify the program,
the tapes have to be changed.
3. In NC machine tool system, tape
reader is a part of machine
control unit.
4. System has no memory storage
and each time it is run using the tape.
5. It can not import CAD files.
6.It can not use feedback system.
1. In CNC machine tool system, the
program is fed to the machine
through the computer.
2.The programs can be easily modified
with the help of computer.
3. The microprocessor or minicomputer
forms the machine control unit.
The CNC machine does not
need tape reader.
4.It has memory storage ability, in which
part program can be stored.
5. System can import CAD files and
convert it to part program.
6.The system can use feedback system.
1. The part program is fed to
the machine through the
Main computer
2. In order to modify the
program, single
computer is used
3. Large memory of DNC
allows it to store a large
amount of part program.
4. Same part program can be
run on different machines
at the same time.
5. The data can be processed
using the MIS software so
as to effectively carry out
the Production planning
and scheduling.
CNC Machine Tool System DNC Machine Tool SystemNC Machine Tool System
Comparison between NC, CNC and DNC machine tools
13. CNC manufacturers
Programming languages
First systems developed and use a programming language similar to
FORTRAN or BASIC
Automatically Programmed Tools (APT) and its many variants
COMPACT II
Dedicated CAM systems
In these systems a dedicated CAM system
helps in developing the CNC part programs
May be linked to a major CAD system such
as AutoCAD, Solidworks, CADKEY,….
Examples
Mastercam
Virtual Gibbs
Smartcam
Edgecam
Alphacam
CAD/CAM systems
Major CAD systems have integrated
manufacturing systems for better interfacing and
translation
Examples are:
Pro engineer – Pro Manufacture
Unigraphics
I-DEAS – Solids machining
CATIA
Intergraph
INTRODUCTION
14. The axes are named
according to DIN 66217.
VIDEO
Three-axes milling machine
Six-axis milling machine
Turning machine
VIDO
A+
C+
B+
AXIS NOMENCLATURE
15. M - Machine Zero or home: This is set by the manufacturer as the origin of the coordinate
system of the machine.
W -Part zero or point of origin of the part: This is the origin point that is set for
programming the measurements of the part. It can be freely selected by the programmer.
R-Machine Reference point. This is a point on the machine established by the
manufacturer around which the synchronization of the system is done. The control positions
the axis on this point.
Reference systems
AXIS NOMENCLATURE
17. Fill the tool carousel.
Define Tool Length & Radius Offsets
Once he workholding device is properly
installed and aligned, set part X,Y&Z zero
datum.
Check coolant and air supply levels,
ensure work area is clean, …
CNC MACHINE SETUPAND OPERATION
18. Machine Reference (R) setting
TOOL LENGTH
COMPENSATION OFF
G44
TOOL LENGTH
COMPENSATION ON
G43
RRRR
T1
L1 L2 L3 L4
RRRR
T2 T3 T4
OFFSET TABLE
TOOL TOOL
OFFSE
T
RADIUS LENGTH
T1 D1 55.234
T2 D1 72.345
T3 D1 61.098
T4 D1 66.683
… … ... …
CNC-REFERENCE SYSTEMS
19. Tool on the workpiece
Machine Reference (R) setting
Low accuracy.
Time consuming method.
Only tool length (L) values are measured.
W
T1 T2 T3 T4
L4 = 0L3 < 0
L2 > 0
L1 < 0
W
Tool is rotating and thus, part or referencing block gets marked.
RRRR
CNC-REFERENCE SYSTEMS
20. Machine Reference (R) setting
Using a tool length setter gauge
Good accuracy.
Time consuming method.
Only tool length (L) values are measured.
W
L2<0L1=0
RR
L1
M
50
z1
z2
L2
50
L1= z1-50 L2= z2-50
R
R
BASEDONAREF.TOOLBASEDONMACHINEDATUM
VIDEO
Part or referencing block does not get marked. TOOL LENGTH MEASUREMENT
CNC-REFERENCE SYSTEMS
21. Part zero (W) setting
Prior to defining part zero, procedure should be:
1. Study how the drawing is dimensioned.
2. Decide on the workholding device type and part zero (W) definition.
Machine operator defines part zero (W) position anywhere.
Most common positions:
o Left lower side of the part (all data position values are positive).
o Part symmetry axis.
o
o
CLAMP CASE Centering pins side.
VISE CASE Stationary chuck & vise stop side.
Movable chuck
Stationary chuck
Vise stop
Centering pinsClamps
Clamps (with or without centering pins) Vise (with or without vise stop)
CNC-REFERENCE SYSTEMS
22. X
Z
Y
Symmetry
X
Y
Z
Y
Part zero (W) setting
X
Z
Y
X
Y
Z
Y
VISE VISE
Stationary chuck & Y axis part symmetryX-Y axis part symmetry
CNC-REFERENCE SYSTEMS
23. Part zero (W) setting
X
Y
Z
X
Z
VISE CLAMP
X
Y
Z
X
Stationary chuck & left lower part Stationary chuck & Y axis part symmetry
CNC-REFERENCE SYSTEMS
24. Part zero (W) setting
VIDEO
Using the tool
Low accuracy.
Tool is rotating and thus, part gets
marked.
Using a mechanical edge finder1 2
Low accuracy.
Optical edge finder similar
X
DATUM SETTING
X
Y DATUM SETTING
VIDEO
YZ
CNC-REFERENCE SYSTEMS
25. 3
Part zero (W) setting
Using a touch probe
High accuracy.
X
Y DATUM SETTING
VIDEO VIDEO Z
CNC-REFERENCE SYSTEMS
26. 2 types:
1. Touch-trigger probes
2. Scanning probes (continuous measuring)
PRO & CON:
A ost any machined geometry may be measured in-situ.
uced machine downtime.
P t unclamping for measuring is avoided.
I nnot consider possible machine axes errors.
lm
Red
ar
t ca
Touch probe stylus tips
3
Part zero (W) setting
CNC-REFERENCE SYSTEMS
Using a touch probe
28. BASIC ISO PROGRAMMING
Preparatory
functions
or G-codes
Speed function
Block identification
Identifies the block of information.
Block structure
N**** G** X****.*** Y****.*** Z****.*** A****.*** B****.*** C****.*** F****.** S****.**
Linear and angular
positioning data Feed function
T** D** M** N** ; *****
Miscellaneous or auxiliary functions
Tool offset number
Tool number
Number of block repetitions
Block comment
Not ISO,
corresponds to
FAGOR 8055M
=
29. Feed function (F) Speed function (S)
The speed function S is the speed at which the
tool (in milling) or part (in turning) rotates.
The maximum S value is limited by the machine
parameters.
The feed function F is the speed at which the tool
center point moves.
The programmed F is effective working in linear
(G01) or circular (G02, G03).
The maximum F value is limited by the machine
parameters.
BASIC ISO PROGRAMMING
30. Tool number (T)
The "T" code identifies the tool position in the tool magazine.
BASIC ISO PROGRAMMING
Tool offset number (D)
The tool offset contains the tool dimensions.
Each tool may have several offsets associated with it.
… … … … … … … …
…
TOOL TOOL
OFFSE
T
RADIUS LENGTH …
T1 D1 8.002 55.234 …
D2 7.502 55.234 …
D3 8.002 55.026 …
TOOL TOOL
OFFSE
T
RADIUS LENGTH …
T2 D1 4.000 72.345 …
D2 11.990 60.036 …
D3 7.500 33.110 …
31. M functions DESCRIPTION
M00 Program STOP / Spindle STOP / Coolant OFF
M03 Spindle ON clockwise
M04 Spindle ON counterclockwise
M05 Spindle STOP
M06 Tool change
M08 Coolant ON
M09 Coolant OFF
BASIC ISO PROGRAMMING
M30 End of program
Auxiliary or Miscellaneous (M) functions
32. Preparatory functions or G-codes
M functions MODAL DESCRIPTION
G00 * Rapid traverse
G01 * Linear interpolation
G02 * Clockwise circular interpolation
G03 * Counterclockwise circular interpolation
G05 * Controlled corner rounding
G07 * Square corner
G36 * Automatic radius blend
G39 * Chamfer
G40 * Cancellation of tool radius compensation
G41 * Left-hand tool radius compensation
G42 * Right-hand tool radius compensation
G43 * Tool length compensation
G44 * Cancellation of tool length compensation
G90 * Absolute programming
G91 * Incremental programming
… … …
BASIC ISO PROGRAMMING
MODAL = Once programmed, it remains active until
another incompatible G function is
programmed or until M30 / EMERGENCY
or RESET.
33. It is a positioning linear movement at maximum
F value defined in the machine parameters.
Not valid for cutting.
It can be programmed as G00, G0 or G.
BASIC ISO PROGRAMMING
Preparatory functions or G-codes
Rapid traverse (G00) Linear interpolation (G01)
It is a working linear movement at the
programmed F value.
It can be programmed as G01 or G1.
…
N80 G00 X500 Y300
…
…
N120 G01 X500 Y300 F400
…
(TP)
(SP)
(TP)
(SP)
G00 X Y
TP
G01 X Y
TP
35. I
J
SP
TP
CC
I
J
SP
TP
CC
It is a working circular movement at the programmed F value.
It can be programmed as G02 or G2 / G03 or G3.
BASIC ISO PROGRAMMING
Preparatory functions or G-codes
Clockwise circular interpolation (G02)
Counterclockwise circular interpolation (G03)
…
N60 G02 X300 Y300 I200 J0
…
CARTESIANCOORDINATES
WITHARCCENTER
G02 X Y I J
TP Distance from the SP to
the Circle Center (CC).
…
N60 G03 X300 Y300 I0 J200
…
G03 X Y I J
TP Distance from the SP to
the Circle Center (CC).
36. SP
TP
SP
TP
BASIC ISO PROGRAMMING
Preparatory functions or G-codes
…
N40 G02 X400 Y150 R150
…
…
N40
…
Clockwise circular interpolation (G02)
Counterclockwise circular interpolation (G03)
CARTESIANCOORDINATES
WITHARCRADIUS
G02 X Y R
R + : Arc < 180ºTP
A complete circle cannot be programmed.
G02 X400 Y150 R-150
R+
…
N40 G03 X400 Y300 R150
…
…
N40 G03 X400 Y300 R-150
…
R+
G03 X Y R
R + : Arc < 180ºTP
37. BASIC ISO PROGRAMMING
Preparatory functions or G-codes
Clockwise circular interpolation (G02)
Counterclockwise circular interpolation (G03)
EXERCISE 2 EXERCISE 3
EXERCISE 4 EXERCISE 5
SP
w
SP
w
w
SP
w
SP
38. BASIC ISO PROGRAMMING
Preparatory functions or G-codes
Clockwise circular interpolation (G02)
Counterclockwise circular interpolation (G03)
EXERCISE 6
SP
w
39. Preparatory functions or G-codes
Absolute programming (G90)
Incremental programming (G91)
G90: The positioning data refers to the part zero (default).
G91: The positioning data corresponds to the distance to be travelled from the point where the
tool is situated.
N100 G01 X-25 Y0 ; P5
N110 G01 X0 Y-30 ; P6
…
= SP
w
…
N70 G01 G90 X70 Y15 F350 ; P2
N80 G01 X70 Y30 ; P3
N90 G01 X45 Y45 ; P4
N100 G01 X20 Y45 ; P5
N110 G01 X20 Y15 ; P6
…
Absolute programming (G90)
…
N70 G01 G91 X50 Y0 F350; P2
N80 G01 X0 Y15 ; P3
N90 G01 X-25 Y15 ; P4
Incremental programming (G91)
BASIC ISO PROGRAMMING
40. Preparatory functions or G-codes
Absolute programming (G90)
Incremental programming (G91)
EXERCISE 7
w
EXERCISE 8
SP
SP
BASIC ISO PROGRAMMING
41. Preparatory functions or G-codes
Square corner (G07) Round corner (G05)
The CNC starts executing the following block as
soon as the position programmed in the current
block has reached the dead band (default)
Sharp edges, Machining time ↑, Shocks ↑.
To be used with G00: face milling, canned
cycles, …
The CNC starts executing the following block as
soon as deceleration of the currently executing
axes start (“?” distance depends on the feedrate
F value) Rounded edges, Machining time ↓
NOT to be used with G00: slot milling,
engraving, contouring,…
Fx
…
N60 G01 G07 X50 Y100 F400
N70 G01 X140 Y100 F300
…
…
N60 G01 G05 X50 Y100 F400
N70 G01 X140 Y100 F300
…
w
t
Fy
t
w
DEAD BAND: The range
through which an input can be
varied without initiating response
t
Fy
t
Fx
Acceleration
Constant feed
Deceleration
BASIC ISO PROGRAMMING
42. Preparatory functions or G-codes
Cancellation of tool radius compensation (G40)
Left-hand tool radius compensation (G41)
Right-hand tool radius compensation (G42)
The CNC automatically calculates the path the tool should follow based on the contour of the part
and the tool radius value stored in the tool offset table.
BASIC ISO PROGRAMMING
43. Preparatory functions or G-codes
Automatic radius blend (G36) Chamfer (G39)
It rounds a corner with a determined radius,
without having to calculate the center nor the
start and end points of the arc.
Function G36 is not modal.
…
N60 G01 G36 R5 X250 Y450 F400
N70 G01 X400 Y0
…
…
N60 G01 G39 R15 X350 Y600 F400
N70 G01 X500 Y0
…
G36 R
It chamfers corners between two straight lines,
without having to calculate intersection points.
Function G39 is not modal.
G39 R
BASIC ISO PROGRAMMING
49. Cycles are referred to repetitive program sequences commonly used In machining operations
that makes easier programming.
• Canned cycles or Fixed cycles: They are an inbuilt feature of the CNC usually
permanently stored as a pre-program and cannot be altered by the user (G80-G89)
• User-defined cycles or Sub-routines: They are created when the necessary fixed
cycle is not available.
FIXED CYCLES OR CANNED CYCLES
CANNED
CYCLE
NUMBER
DESCRIPTION
G80 Canned cycle cancellation
G81 Drilling cycle
G84 Tapping cycle
G85 Reaming cycle
G87 Rectangular pocket cycle
G88 Circular pocket cycle
50. G81 G98/G99 X Y Z I K
G81: Drilling cycle
FIXED CYCLES OR CANNED CYCLES
Only one drill machining
N0 T1 D1 ; Ø8mm drill N10 M06
N20 G00 G43 X30 Y20 Z100 F300 S1400 M03
N30 G81 G98 X30 Y20 Z2 I-15 K100 ; P1
N40 G80 N50 M30
Four drills machining
N0 T1 D1 ; Ø8mm drill N10 M06
N20 G00 X30 Y20 Z100 F300 S1400 M03
N30 G81 G99 X30 Y20 Z2 I-15 K100 ; P1
N40 G00 X80 Y20 ; P2
N50 G00 X80 Y50 ; P3
N60 G00 G98 X30 Y50 ; P4
N70 G80
N80 M30
Valid for drilling depth
≤ 3*Ø
Valid for pecking cycle
Dwell time
(1/100s)
I.P. R.P.
Distance from
w to the
drilling depth
Distance from
w to the R.P.
Machining
coordinates
Withdrawal
planes
Z
I
15
Initial Plane (I.P.) - G98
Reference Plane (R.P.) - G99
W
8
4 3
1 2
51. G81 G98/G99 X Y Z I K
G81: Drilling cycle
FIXED CYCLES OR CANNED CYCLES
Valid for drilling depth
≤ 3*Ø
Valid for pecking cycle
Four drills machining
N0 T1 D1 ; Ø8mm drill
N10 M06
N20 G00 G43 X30 Y20 Z100 F300 S1400 M03 ; Z100
N30 G81 G99 X30 Y20 Z2 I-15 K100 ; Z2
N40 G00 G98 X30 Y50 ; Z100
N50 G81 G99 X80 Y50 Z27 I10 K100 ; Z27
N60 G00 G98 X80 Y20 ; Z100
N70 G80
N80 M30
Dwell time
(1/100s)
I.P. R.P.
Distance from
w to the
drilling depth
Distance from
w to the R.P.
Machining
coordinates
Withdrawal
planes
Z
Z’R.P. - G99
Initial Plane (I.P.) - G98
Ref. Plane’ (R.P.) - G99’
W
15
I’
I
25
10
8
2 3
1 4
52. G84: Tapping cycle
N0 T7 D7 ; M-10 tap
N10 M06
N20 G00 G43 X50 Y20 Z100 F600 S600 M03
N30 G84 G98 X50 Y20 Z2 I-60 R0
N40 G80
N50 M30
Z
I
Ref. Plane (R.P.) - G99
Initial Plane (I.P.) - G98
W
60
G84 G98/G99 X Y Z I K R
Dwell time
(1/100s)
I.P. R.P.
Distance from
w to the thread
depth
Distance from
w to the R.P.
Machining
coordinates
Withdrawal
planes
FIXED CYCLES OR CANNED CYCLES
Type of tapping
R=0 Normal tapping
R=1 Rigid tapping
53. N0 T4 D4 ; Ø12H6 reamer
N10 M06
N20 G00 G43 X30 Y20 Z100 F500 S2500 M03
N30 G85 G99 X30 Y20 Z2 I-35 K100
N40 G00 G98 X30 Y50
N50 G85 G99 X80 Y50 Z22 I-15 K100
N60 G00 X80 Y20
N70 G80
N80 M30
G85 G98/G99 X Y Z I K
Dwell time
(1/100s)
I.P. R.P.
Distance from
w to the
reaming depth
Distance from
w to the R.P.
Machining
coordinates
Withdrawal
planes
FIXED CYCLES OR CANNED CYCLES
G85: Reaming cycle
12
2 3
1 4
Z
Z’R.P. - G99
Initial Plane (I.P.) - G98
Ref. Plane’ (R.P.) - G99’
W
35
I’
I
20
15