You are on page 1of 46

CNC Machining and other

CNC Applications

Lesson Outcomes
By the end of this lesson, students should be able to:
Understand the concept of Computer Numerical
Control System and its applications
Understand the fundamental components of an
CNC system
Understand aspects of CNC motion control
Understand aspects of CNC codes
Understand the advantages and disadvantages of
CNC control systems

What is Computer Numerical


Control (CNC)?
(Definition:) A form of programmable
automation in which the mechanical actions of
a machine tool or other equipment are
controlled by a program.
Program of instructions (numbers, letters
symbols) used to control a process
Main advantage: Flexibility (easy to change
program of instructions for different parts)

Applications of CNC Control


Technology
1. Machine tool applications to control the
relative motion between cutting tool and
workpiece.
Examples:

CNC Lathe
CNC Milling
CNC Machining Ctr
CNC Turning Center
CNC Wire-cut

CNC EDM
CNC Grinder
CNC Laser-cut
CNC Water-jet
CNC Punch & Blanking
CNC Drilling & Boring

Applications of CNC Control


2. Non-Machine Tool Applications
Examples:
-Assembly
(CNC used to control assembly machines)
-Drafting
(Once a CAD drawing is completed, CNC is used to
control a plotter to generate an engineering drawing)
-Robotics
(CNC is used to control the motors that move robotic arms)
-Quality Control and Inspection
(eg CNC CMM)

Components of an CNC System


1. Program of instructions or part program
2. Machine control unit
3. Processing equipment

Components of an CNC System


1. Program of instructions:
The detailed step by step commands that
direct the actions or movements of the
machine
Program written manually & key-in or via
CAD/CAM

Components of an CNC System


2. Machine Control Unit (MCU):
Microcomputer and control hardware that
read and interprets the program of instructions
and converts it into signals to the processing
equipment.
Diskette / RS232C/ CPU/CRT/HDD/RAM
buffer/CPU convert CNC program into
electronic pulses to drive various motors

Components of an CNC System


3. Processing equipment:
The part of the CNC System that performs the
useful work
Examples are:

Worktable, spindle and motors in a machine tool


Motors and linkages in a robotic system
This machine tool/ production process designed to
give high level of repeatability and precision

CNC Motion Control


Systems
Three aspects of CNC Motion Control
Systems:
1. Point-to-point
2. Interpolation methods (Continuous Path
Control)
3. Absolute vs. Incremental positioning

NC Motion Control Systems


1. Point to point system:
Tool movement is arbitrary as long as the final
destination is reached
A tool may move through a number of different
points before reaching the final destination.
Examples: drilling and spot welding operations
Processing action is performed after location is
reached

NC Motion Control Systems


2. Interpolation methods (Continuous path control
system)

Some shapes such as circles and ellipses are


continuous.
NC control system, however, is digital.
Therefore, a circle or ellipse must be divided
into straight segments to approximate the curve.
This leads to a very large number of points
Interpolation methods calculate the intermediate
points and generate a smooth continuous points

NC Motion Control Systems


2. Interpolation methods (Continuous path control
system:
The path followed by the tool is continuously
controlled to get the desired geometrical feature
Movement of worktable by continuously and
simultaneously controlling two or more axes.
Provides control of the tool path.
Processing action is performed during
movement.
Allow for generation of 2D and 3D contours

CNC Motion Control Systems


2. Absolute vs. Incremental Positioning
Absolute positioning:
Positions are defined with respect to the origin
of coordinate system
Incremental positioning:
Positions are defined relative to the previous
location

CNC Co-ordinate System

Floating zero point system


This feature allows the user to place a
secondary coordinate system anywhere on
the machine table.
This makes it easy to develop the part
program & machine the workpiece

CNC Codes
CNC Code (forms the
program of instructions)
Types of CNC Code:
Sequence/block number (N
Code)
Preparatory Codes (G
Codes)
Miscellaneous Codes (M
Codes)
Feed and Speed Codes
Tools Codes
Source: MTAB

CNC Codes
Sequence/Block
number (N
Codes)
Describes the
block of codes in
a program

Source: MTAB

CNC Codes
Source: MTAB

Preparatory Codes (G Codes)


Relevant G Codes:
G00
G28
G01
G90
G02
G91
G03
G92
G20
G94
G21

CNC Codes
Preparatory Codes (G Codes)
G00 Rapid Traverse of fast Traverse
A G00 causes the tool to move to the specified
position at maximum speed.
(for non-cutting movements)
Example: G00 X20 Y30 Z1
Here the tool is moved to X 20mm, Y 30mm, and
Z 1mm (for metric system)

CNC Codes
Preparatory Codes (G Codes)
G01 Linear Interpolation
A G01 causes linear motion to the given
position.
Example: G01 X20 Y30 F45
Here the tool is moved to X 20mm, Y 30mm

CNC Codes
Preparatory Codes (G Codes)
G02 Clockwise Circular Interpolation
Arcs can be specified by either radius or by centre.
Example: G02 X30 Y20 R15
In this example the tool is moved to X 30mm and Y
20mm. The arc has a radius of 15mm.
I and J specifies the arc centre relative to the arc
start. If the value-+ is 0 then it need not be specified.
Example: G02 X30 Y20 I15 J0

CNC Codes
Preparatory Codes (G Codes)
G03 Counter-Clockwise Circular Interpolation
G03 causes counter-clockwise circular motion
Similar to G02

CNC Codes
Preparatory Codes (G Codes)
G20 Imperial Units
All future instruction parameters will be taken
as imperial values.

CNC Codes
Preparatory Codes (G Codes)
G21 Metric Units
All Future instruction parameters will be taken
as metric values.

CNC Codes
Preparatory Codes (G Codes)
G28 Automatic Zero Return
Send spindle to home position
Usually used for tool change or setting up for a
new program
Milling:

N020 G91 G28 Z0


N030 G28 X0 Y0

Lathe:

N020 G28 U0 W0

CNC Codes
Preparatory Codes (G Codes)
G40 Cancel cutter compensation
G41 and G42 are used to locate the tool on
either left or right side of the profile
G40 is used to cancel this tool compensation

CNC Codes
Preparatory Codes (G Codes)
G90 Absolute Movement
All future movements will be absolute until
overridden by a G91 instruction
Example: G90
G01 X30 Y0
The new position becomes X30 Y0

CNC Codes
Preparatory Codes (G Codes)
G91 Incremental Movement
All future movements will be incremental until
overridden by a G90 instruction.
Example: G90
G01 X15
G91
G01 X2
The position becomes X17

CNC Codes
Preparatory Codes (G Codes)
G92 Programming of the coordinate system
Defines a coordinate system
Example: G00 X30.0 Y40.0
G92 X0.0 Y0.0
Converts the position that was X30 Y40 to X0
Y0

CNC Codes
Miscellaneous Codes (M Codes)
Relevant M Codes:
M03
M05
M06

CNC Codes
Miscellaneous Codes (M Codes)
Relevant M Codes:
M03 Start Spindle
An M03 instruction starts forward spindle motion.
Example: M03 S2200
The spindle should be switched on before any
movement below the component surface.

CNC Codes
Miscellaneous Codes (M Codes)
Relevant M Codes:
M05 Stop Spindle
An M05 instruction stops spindle rotation.
M05 is issued before a tool change, and at the
end of a program.

CNC Codes
Miscellaneous Codes (M Codes)
Relevant M Codes:
M06 Change Tool
The M06 instruction causes the a change to a
different tool. The tool changing operation should be
done in the home position only.
Example: M06 T1
Changes to the tool in turret 1

CNC Codes
Miscellaneous Codes (M Codes)
Relevant M Codes:
M30 End of Program
Rewind program and reset memory

CNC Codes
Feed and Speed Codes
Feed code (F code)
Specifies the tool motion feed rate
Unit can be in mm/min, in/min, mm/rev or in/rev
Example: F50

Speed code (S code)


Specifies the rate of tool revolution
Unit is in RPM
Example: S1200

CNC Codes
Tool code (T code)
Refers to a location on tool turret
Example: M06 T1

CNC Machine tools:


Program of Instructions example (Milling)
F Feed code (F
code)
S Speed code
(S code)
T Tool code (T
code)

G00 Rapid Traverse of fast Traverse G40 Cancel cutter


compensation
G01 Linear Interpolation
G71 Rough out profile by
G02 Clockwise Circular Interpolation
turning
G03 Counter-Clockwise Circular
G70 Finishing Cycle
Interpolation
G90 Absolute Movement
G20 Imperial Units
G91 Incremental Movement
G21 Metric Units
G92 Programming of the
G28 Automatic Zero Return
coordinate system

G94 Feed rate in mm/min


in/min (G98 performs the s
function in the CNC lathe)
G95 Feed rate in mm/rev
in/rev
M03 Start Spindle
M05 Stop Spindle
M06 Change Tool
M30 End of Program

Program of Instructions example (Milling)

Source: MTAB

G00 Rapid Traverse of fast Traverse


G01 Linear Interpolation
G02 Clockwise Circular Interpolation

G03 Counter-Clockwise Circular


Interpolation

B
A

G20 Imperial Units


G21 Metric Units
G28 Automatic Zero Return
G40 Cancel cutter compensation
G71 Rough out profile by turning
G70 Finishing Cycle
G90 Absolute Movement
G91 Incremental Movement
G92 Programming of the coordinate system
G94 Feed rate in mm/min or in/min (G98
performs the same function in the CNC
lathe)
G95 Feed rate in mm/rev or in/rev

M03 Start Spindle


M05 Stop Spindle
M06 Change Tool
M30 End of Program
F Feed code (F code)
S Speed code (S code)
T Tool code (T code)

Source: MTAB

CNC Program of Instructions example (Lathe)

Z1

Source: MTAB

CNC Codes:
Summary of relevant codes
G00 Rapid Traverse of fast Traverse
G01 Linear Interpolation
G02 Clockwise Circular Interpolation
G03 Counter-Clockwise Circular
Interpolation
G20 Imperial Units
G21 Metric Units
G28 Automatic Zero Return
G40 Cancel cutter compensation
G71 Rough out profile by turning
G70 Finishing Cycle
G90 Absolute Movement
G91 Incremental Movement
G92 Programming of the coordinate system

G94 Feed rate in mm/min or


in/min (G98 performs the same
function in the CNC lathe)
G95 Feed rate in mm/rev or
in/rev

M03 Start Spindle


M05 Stop Spindle
M06 Change Tool
M30 End of Program
F Feed code (F code)
S Speed code (S code)
T Tool code (T code)

Advantages of CNC Control systems


1. Reduce nonproductive time
2. Greater accuracy and repeatability
3. More complex part geometeries are
possible
4. Lesser operator skill-level is required
5. Easy to make engineering changes
(flexible).
6. Less floor space requirement

Disadvantages of CNC
Control Systems
1. Higher cost of initial investment
2. Higher maintenance cost
3. Requires part programming (conventional
machining does not require any
programming)

Summary

CNC is a form of programmable automation


The three components of an CNC system are the
program of instructions, MCU, and the
processing equipment
Three aspects of CNC motion control are Pointto-point vs. Continuous Path Control,
Interpolation methods and Absolute vs.
Incremental positioning
Alphanumeric CNC codes (G&M) codes are
used for tool motion control and miscellaneous
parts