Computer Numerical Control (CNC) : Reading Materials For IC Training Modules
Computer Numerical Control (CNC) : Reading Materials For IC Training Modules
Computer Numerical Control (CNC) : Reading Materials For IC Training Modules
IC Training Modules
Computer
Numerical
Control
(CNC)
IC PROFESSIONAL TRAINING SERIES
Last updated at AUGUST 2009
Copyright reserved by INDUSTRIAL CENTRE, THE HONG KONG POLYTECHNIC UNIVERSITY
Computer Numerical
Control (CNC)
Objectives:
Content:
Chapter 1
Chapter 2
Chapter 3
Introduction
Computer Numerical Control (CNC) is a specialized and versatile form of Soft
Automation and its applications cover many kinds, although it was initially
developed to control the motion and operation of machine tools.
Computer Numerical Control may be considered to be a means of operating a
machine through the use of discrete numerical values fed into the machine, where the
required 'input' technical information is stored on a kind of input media such as
floppy disk, hard disk, CD ROM, DVD, USB flash drive, or RAM card etc. The
machine follows a predetermined sequence of machining operations at the
predetermined speeds necessary to produce a work piece of the right shape and size
and thus according to completely predictable results. A different product can be
produced through reprogramming and a low-quantity production run of different
products is justified.
Page 1
IC Professional Training
Control Systems
Page 2
IC Professional Training
1.2
Input Device
Machine Control Unit
Machine Tool
Driving System
Feedback Devices
Display Unit
Page 3
IC Professional Training
are impervious to dust and scratches that enable flash drives to transfer data
from place to place. In recent years, all computers support USB flash drives to
read and write data that make it become more and more popular in CNC
machine control unit.
c. Serial communication
The data transfer between a computer and a CNC machine tool is often
accomplished through a serial communication port. International standards for serial
communications are established so that information can be exchanged in an orderly
way The most common interface between computers and CNC machine tools
is. referred to the EIA Standard RS-232. Most of the personal computers and
CNC machine tools have built in RS232 port and a standard RS-232 cable is
used to connect a CNC machine to a computer which enables the data
transfer in reliable way. Part programs can be downloaded into the memory of a
machine tool or uploaded to the computer for temporary storage by running
a communication program on the computer and setting up the machine control to
interact with the communication software.
Page 5
IC Professional Training
d. Ethernet communication
Due to the advancement of the computer technology and the drastic reduction of
the cost of the computer, it is becoming more practical and economic to transfer
part programmers between computers and CNC machines via an Ethernet
communication cable. This media provides a more efficient and reliable means in
part programmer transmission and storage. Most companies now built a Local Area
Network (LAN) as their infrastructure. More and more CNC machine tools provide
an option of the Ethernet Card for direct communication within the LAN.
Page 6
IC Professional Training
e. Conversational Programming
Part programmes can be input to the controller via the keyboard. Built-in
intelligent software inside the controller enables the operator to enter the required
data step by step. This is a very efficient way for preparing programmes for
relatively simple work pieces involving up to 2 axis machining.
Page 7
IC Professional Training
Page 8
IC Professional Training
a. DC Servo Motor
This is the most common type of feed motors used in CNC machines. The principle
of operation is based on the rotation of an armature winding in a permanently
energized magnetic field. The armature winding is connected to a commutator,
which is a cylinder of insulated copper segments mounted on the shaft. DC current
is passed to the commutator through carbon brushes, which are connected to the
machine terminals. The change of the motor speed is by varying the armature
voltage and the control of motor torque is achieved by controlling the motor's
armature current. In order to achieve the necessary dynamic behaviour it is
operated in a closed loop system equipped with sensors to obtain the velocity and
position feedback signals.
b. AC Servo Motor
In an AC servomotor, the rotor is a permanent magnet while the stator is
equipped with 3-phase windings. The speed of the rotor is equal to the rotational
frequency of the magnetic field of the stator, which is regulated by the frequency
converter.
AC motors are gradually replacing DC servomotors. The main reason is that there
is no commutator or brushes in AC servomotor so that maintenance is virtually not
required. Furthermore, AC servos have a smaller power-to-weight ratio and faster
response.
Page 9
IC Professional Training
c. Stepping Motor
A stepping motor is a device that converts the electrical pulses into discrete
mechanical rotational motions of the motor shaft. This is the simplest device that can
be applied to CNC machines since it can convert digital data into actual mechanical
displacement. It is not necessary to have any analog-to-digital converter nor
feedback device for the control system. They are ideally suited to open loop systems.
However, stepping motors are not commonly used in machine tools due to the
following drawbacks: slow speed, low torque, low resolution and easy to slip in case
of overload. Examples of stepping motor application are the magnetic head of
floppy-disc drive and hard disc drive of computer, daisy-wheel type printer, X-Y tape
control, and CNC EDM Wire-cut machine.
d. Linear Motor
A linear electric motor is an AC rotary motor laid out flat. The same principle used
to produce torque in rotary motors is used to produce force in linear motors.
Through the electromagnetic interaction between a coil assembly and a
permanent magnet assembly, the electrical energy is converted to linear
mechanical energy to generate a linear motion. As the motion of the motor is
linear instead of rotational, therefore it is called linear motor. Linear motors have
the advantages of high speeds, high precision and fast response. In the 1980s,
Page 10
IC Professional Training
The ironless linear motor has the advantages of lower core mass, lower
inductance and no cogging for smooth motion as the ironless motors have no attractive
force between the frameless components.
Page 11
IC Professional Training
Page 12
IC Professional Training
Page 13
IC Professional Training
1.3
CNC machines are widely used in the metal cutting industry and are best used to
produce the following types of product:
Some common types of CNC machines and instruments used in industry are
as following:
Drilling Machine
Grinding Machine
Industrial Robot
Page 14
IC Professional Training
2.1
Axis of motion
In generally, all motions have 6 degrees of freedom. In other words, motion can be
resolved into 6 axes, namely, 3 linear axes (X, Y and Z axis) and 3 rotational axes (A,
B, and C axis).
Y
Z
2.2
Dimension Systems
Page 15
IC Professional Training
2.3
Definition of Programming
NC programming is where all the machining data are compiled and where 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:
a.
b.
c.
Page 16
IC Professional Training
2.4
Programme Structure
Program
start
Block
#1
Block
#2
Block
#30
Sequence
Number
Word
#1
N002
G
X
End of
Programme
Word
#2
G01
Address
Block
#31
X12.0
Value
01
12.0
Address
Sequence number
Preparatory function
Co ordinate word
Parameters for Circular Interpolation
Feed function
Spindle function
Tool function
Miscellaneous function
N
G
X, Y, Z
I, J, K
F
S
T
M
Page 17
IC Professional Training
2.5
Explanation of Words
Function
Point to point position at rapid feed
Linear interpolation
Circular interpolation, clockwise
Circular interpolation, anti clockwise
Cutter compensation cancel
Cutter compensation, Left
Cutter compensation, Right
Other cutter compensation, if used
Milling and turning cycle
Drilling and tapping cycle
Absolute dimensioning
Incremental dimensioning
X100 Y-200
represents the movement to (100, 200). Whether the dimensions are
absolute or incremental will have to be defined previously (using
G90 or G91).
Page 18
IC Professional Training
Spindle Speed=
The following table gives the surface cutting speeds for some common materials:
Example:
Cutting tool
Workpiece material
Material
Al alloy
Brass
Cast Iron
Mild Steel
HSS
120
75
18
30
Carbide
500
180
120
200
Milling Cutter
Material
Al alloy
Brass
Cast Iron
Mild Steel
HSS
0.28
0.18
0.20
0.13
Sintered Carbide
0.25
0.15
0.25
0.25
Example:
F200
T02
Page 19
IC Professional Training
Function
M00
M03
M04
M05
M06
M08
M09
M10
M11
M30
Programme stop
Spindle rotation clockwise
Spindle rotation counterclockwise
Spindle STOP
Change of Tool
Coolant ON
Coolant OFF
Clamp
Unclamp
Programme end and ready for another start
2.6
c.
d.
e.
f.
g.
h.
i.
j.
k.
Start machining.
Page 20
IC Professional Training
2.7
Rapid
Traverse
X
Fig.2-5 Rapid Positioning
Page 21
IC Professional Training
At Designated
Speed
X
Fig.2-6 Linear Interpolation
Page 22
IC Professional Training
Start point
(Xs, Ys)
J
(Xc, Yc)
End
point
Programme Format
(Counterclockwise Direction)
G03
X
Y
I
J
Y
End
(Xc, Yc)
J
Start point
(Xs, Ys)
Page 23
IC Professional Training
Programme
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.
Page 24
IC Professional Training
Programme Example 1
Programme
Explanation
N01
G90
Absolute Dimensioning
N02
G00
N03
T01
N04
G00
N05
G01
Z-10 F100
N06
N07
G01
Y66.564
N08
G02
X16.111 Y86.183
I20 J0
N09
G02
X93.889 Y86.183
I38.889 J-196.183
N10
G02
X110 Y66.564
I-3.889 J-19.619
N11
G01
Y26.247
N12
G02
X98.882 Y11.758
I-15 J0
N13
G01
X55 Y0
N14
G01
X15
N15
G02
X0 Y15
I0 J15
Page 25
IC Professional Training
N16
G40
X-30 Y-30
Cancel of compensation;
feed to (X-30, Y-30)
N17
G00
Z100 M30
Programming Example 2
T3
MACHINE ZERO
40,30 FROM
TOOL CHANGING
POSITION
T2
LEFT-HAND
TURNING TOOL
T3
RIGHT-HAND
TURNING TOOL
T1
T2
PATH ? B ?
PATH ? A?
Programme
Explanation
N01
G28
U0.1 W0.1;
N02
G00
U-60.0 W-40.0;
N03
G50
N04
G97
S2000;
N05
M03;
Switch on spindle,
turning in forward direction
N06
T0101;
N07
G00
N08
M08;
N09
G69
F0.15;
N10
G01
Z40.45;
N11
G03
N12
G02
X0 Z42.0;
G01
X11.142;
Page 26
IC Professional Training
N15
G03
N16
G01
X16.6 Z9.385;
N17
Z8.5;
N18
X20.6;
N19
Z-3.0;
N20
G00
N21
T0100;
N22
T0202;
N23
G00
N24
G01
N25
G03
N26
G01
N27
X14.0;
N28
G00
N29
T0200;
N30
T0303;
N31
G00
X24.0 Z0;
N32
G01
X-0.5 F0.06;
N33
G00
N34
T0300;
N35
M30;
Programme end
Finish Contouring
X200.0 Z100.0;
X21.0 Z9.385;
X16.6 F0.15;
Page 27
IC Professional Training
a.
Mirror Image
This is the function that converts the programmed path to its mirror
image, which is identical in dimensions but geometrically opposite about
one or two axes.
b.
Programme Repetition and Looping
In actual machining, it is not always possible to machine to the final
dimension in one go. This function enables the looping of a portion of the
programme so that the portion can be executed repeatedly.
c.
Pocketing Cycle
Pocketing is a common process in machining. This is to excavate the
material within a boundary normally in zigzag path and layer by layer. In a
pocketing cycle, the pattern of cutting is pre-determined. The user is
required to input parameters including the length, width and depth of the
pocket, tool path spacing, and layer depth. The CNC system will then
automatically work out the tool path.
d.
Drilling, Boring, Reaming and Tapping Cycle
This is similar to pocketing cycle. In this function, the drilling pattern is
pre-determined by the CNC system. What the user has to do is to input
the required parameters such as the total depth of the hole, the down
feed depth, the relief height and the dwell time at the bottom of the hole.
Page 28
IC Professional Training
3.1
If the geometry is
The part
programmer can create the geometrical model in the CAM package or directly
extract the geometrical model from the CAD/CAM data base.
Built in tool
motion commands can assist the part programmer to calculate the tool paths
automatically.
The part programmer can verify the tool paths through the
It greatly
Page 29
IC Professional Training
CAM
CAD/CAM
rface
CInte/CAM
3D Geometry
Construction
Scanning
/Copy Mill
/Copy
Geometry
Files
Data
Processing
Post
Processing
NC
Program
CNC Machine
Page 30
IC Professional Training
a.
Job setup
This is to input the machine datum, home position, and the cutter
diameters for the CL file.
b.
Operation setup
This is to input into the system the operation parameters such as the feed
rate, tolerance, and approach / retract planes, spindle speed, coolant
ON/OFF, stock offset and the tool selection etc.
c.
Motion definition
Built in machining commands are used to control the tool motion to
machine the products. This includes the hole processing, profile
machining, pocketing, surface machining, gouge checking, etc.
Page 31
IC Professional Training
a.
This is a tailor-made software which output the precise code for a specific
CNC machine. The user is not required to change anything in the
programme.
b.
This is a set of generalized rules which needs the user to customize into
the format that satisfies the requirements of a specific CNC machine.
3.2.5 Data Transmission
After post processing, the CNC programme can be transmitted to the CNC
machines either through the off line or on line process.
a.
Data carriers are used to transmit the CNC programme to the CNC
machines. It includes paper tapes, magnetic tape or magnetic disc.
b.
On Line Processes
Page 33
IC Professional Training
References
Computer Numerical Control of Machine Tools, G.E.Thyer,
Heinemann Professional Publishing 1988
The CNC Workshop, Frank Nanfara, Tony Uccello, Derek
Murphy, Prentice-Hall 2002
CNC Programming, Michael Mattson, Delmar Cengage
Learning, 2010
The Machining of Metals, Armsrego E. J. A., R. H. Brown,
Englewood Cliffs, N.J., Prentice-Hall 1969
Managing Computer Numerical Control Operations, Mike
Lynch, Society of Manufacturing Engineers 1995
International Standard ISO2806 Industrial Automation System Numerical Control of Machines - Vocabulary, International
Organization for Standardization
Page 34
IC Professional Training