You are on page 1of 14

DEPARTMENT OF MANUFACTURING AND

MATERIALS

WORKSHOP TECHNOLOGY
MME 1103

CNC MACHINING

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

Apparatus:
Tools : Turning tools
Milling tools

Machine: CNC Turning Center


CNC Machine Center

Introduction:
The abbreviation CNC stands for computer numerical control, and refers
specifically to a computer "controller" that reads G-code instructions and drives the
machine tool, a powered mechanical device typically used to fabricate metal components
by the selective removal of metal. CNC does numerically directed interpolation of a
cutting tool in the work envelope of a machine. The operating parameters of the CNC can
be altered via software load program.
NC was developed in the late 1940s and early 1950s by John T. Parsons in
collaboration with the MIT Servomechanisms Laboratory. CNC was preceded by NC
(Numerically Controlled) machines, which were hard wired and their operating
parameters could not be changed. The first CNC systems used NC style hardware, and
the computer was used for the tool compensation calculations and sometimes for editing.
Punched tape continued to be used as a medium for transferring G-codes into the
controller for many decades after 1950, until it was eventually superseded by RS232
cables, floppy disks, and finally standard computer network cables. The files containing
the G-codes to be interpreted by the controller are usually saved under the .NC extension.
Most shops have their own saving format that matches their ISO certification
requirements.
The introduction of CNC machines radically changed the manufacturing industry.
Curves are as easy to cut as straight lines, complex 3-D structures are relatively easy to
produce, and the number of machining steps that required human action have been
dramatically reduced.
With the increased automation of manufacturing processes with CNC machining,
considerable improvements in consistency and quality have been achieved. CNC
automation reduced the frequency of errors and provided CNC operators with time to
perform additional tasks. CNC automation also allows for more flexibility in the way
parts are held in the manufacturing process and the time required to change the machine
to produce different components.
In a production environment, a series of CNC machines may be combined into
one station, commonly called a "cell", to progressively machine a part requiring several
operations. CNC machines today are controlled directly from files created by CAM
software packages, so that a part or assembly can go directly from design to
manufacturing without the need of producing a drafted paper drawing of the
manufactured component. In a sense, the CNC machines represent a special segment of
1

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

industrial robot systems, as they are programmable to perform many kinds of machining
operations (within their designed physical limits, like other robotic systems). CNC
machines can run over night and over weekends without operator intervention. Error
detection features have been developed, giving CNC machines the ability to call the
operator's mobile phone if it detects that a tool has broken. While the machine is awaiting
replacement on the tool, it would run other parts it is already loaded with up to that tool
and wait for the operator. The ever changing intelligence of CNC controllers has
dramatically increased job shop cell production. Some machines might even make 1000
parts on a weekend with no operator, checking each part with lasers and sensors.

Figure 1: CNC Turning Center

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

Figure 2: CNC Milling Machine

Example of NC part programming (2D contouring)

Figure 3: Sample Part

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

We assume that the machining is a contouring operation along the outer boundary of a
simple part, whose nominal geometry is as shown on Fig.3.
The tool size is 0.25 inch, and the feed rate of 6 inch per minute is used.
The cutting speed is required to be 300 rpm. To simplify the program, we ignore the Zaxis motions, and that the home position of the tool is at the correct height, centered on
the point located in the machine tool coordinates as (2, 2).
In order to specify the geometry of the motion, we need to compute the location of 5
points from p1 to p5 (later, we shall see that additional points will be needed).
The cutting will proceed along the contour: p0 p1 p2 p3 p4 p5 p1.
// Block 1: start program, use absolute coordinates, spindle speed in rpm, feed in
inch/min, select tool no 1001, turn coolant ON, use up milling (CCW in this case)
N010 G70 G90 G94 G97 M04[EOB]
NOTE: we could use M14 instead of M04 and M08 that we shall use in the next block.
// Block 2: cutting on XY plane, set feed, spindle speed,
N020 G17 F6.0 S300 T1001 M08 [EOB]
// Block 3: move to first point in a straight line (linear interpolation). We now need to
compute the coordinates of p1, as shown in figure below:

Figure 4 : Calculating p1 coordinate

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

N030 G01 X3.875 Y3.698 [EOB]


// Block 4: move to p2 in straight line. coordinates of point p2: x = same as p1; y = 4 + 5
+ 0.125.
N040 G01 X3.875 Y9.125 [EOB]
// Block 5: move to p3. coordinates calculated as shown in figure below:

Figure 5 : Calculating p3 coordinate


N050 G01 X5.635 Y9.125 [EOB]
// blocks 6, 7, 8: now we need to cut along a circular arc.
Most NC controllers cannot cut along a full circle directly -- they need to be programmed
once FOR EACH QUADRANT of the arc. In our case, the circular path of the tool goes
through tree quadrants, so we need to find two additional points, p31, and p32.
Programming for circular interpolation (moving the tool along a circular arc):
Circular arcs are machined only in main planes. The plane is selected by the preparatory
functions (G17, G18, G19).
The direction of the tool along the arc must be specified
(G02, G03, G20 G21, G30, G31).

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

Four dimension words are needed per block. Two dimension words specify the distance
to the end of the arc from current position. Two circular dimension words specify the
distance to the arc center. Usually, I, J, K specify the distances parallel to the X, Y, Z
axes, respectively.
The I, J, K values are absolute values (unless there is ambiguity).
The following figure shows the computations of the next three blocks of motion:

Figure 6 : Circular movement from p3 to p4


The corresponding blocks are:
*NOTE: EOB stands for End Of Block
N060 G03 X5.625 Y9.0 I0.866 J0.125 [EOB]
N070 G03 X6.5 Y8.125 I0.875 J0.0 [EOB]
N080 G03 X7.375 Y9.0 I0.0 J0.875 [EOB]
// block 9: the next move is to point p4 (coordinates computed similar to p3).
N090 G03 X7.366 Y9.125 I0.875 J0.00[EOB]

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

// blocks 10, 11, 12: all linear interpolation. Computations for the point p5 are as follows:
p4: y = 9.125; x = 9 + 0.125 tan 67.5 = 9.302
N100 G01 X9.302 [EOB]
NOTE: here we did not specify the Y coordinate, so it will be kept constant !
N110 G01 X3.875 Y3.698 [EOB]
N120 G01 X2.0 Y2.0 M30 [EOB]

CNC TURNING
Table 1: Basic codes/ Basic Keys
GFunction
code
G00
Positioning (Rapid Traverse)
G01
Linear Interpolation (Cutting
Feed)
G02
Circular Interpolation/Helical
Interpolation CW
G03
Circular Interpolation/Helical
Interpolation CCW
G17
XY plane selection
G18
ZX plane selection
G19
YZ plane selection
G20
Input in inch
G21
Input in mm
G28

Auto Return to reference point

M42

G5459
G70
G71
G72
G73
G74

Working coordinate system (1-6


selection)
Finishing cycle
Stock Removal in turning
Stock Removal in Facing
Pattern repeating
End face peck drilling

Other
codes
N
F
T
;
U

G92

Maximum Spindle speed

G96

Constant Surface speed control

M-code

Function

M00
M01

Program STOP
Program STOP optional

M03

Spindle START CW

M04

Spindle START CCW

M05
M08
M09
M30
M41

Spindle STOP
Coolant ON
Coolant OF
END of program
Spindle gear range 1-LOW
(45-1500RPM)
Spindle gear range 1HIGH(135-4500RPM)

Block Number
Feed (mm/min or inch/min)
Tool
End of block [EOB]
Incremental coordinate for xaxis
Incremental coordinate for zaxis

MANUFACTURING AND MATERIALS DEPARTMENT

ABBREVIATION

MME1103
Workshop Technology Manual
CNC Machining

KEY SYMBOL

HOME
(ZERO RETURN)

DESCRIPTION
Axis Home Selection :
Both axes move to home
position
JOG feed selection:
Mode is step feed

JOG

MPG

MANUAL PULSE
GENERATOR:
To use Handwheel

AUTO

AUTO Mode Selection:


Mode is automatic
operation
SINGLE BLOCK program
execution for test
operation.

SINGLE
BLOCK

EDIT Mode Selection:


for editing program

EDIT

MANUAL PULSE
GENERATOR:
electronics handwheel, low
feed rate
MANUAL PULSE
GENERATOR:
electronics handwheel,
medium feed rate
MANUAL PULSE
GENERATOR:
electronics handwheel,
high feed rate
Automatic operation is
started

MPG x1

MPG x10

MPG x100

CYCLE START

Automatic operation is
stopped

CYCLE STOP

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

COOLANT ON:
Manual selection of
coolant ON

CLNT ON

COOLANT OFF:
Manual selection of
coolant OFF

CLNT OFF

POSITION:
Shows all coordinates

POS

TOOL OFFSET
SETTING:
Write mode selection,
manually input tool offset
data
PROGRAM:
To open existing program,
load new program, edit
program
To cancel input data
*same as backspace key
in computer keyboard

OFFSET SETTING

PROG

CANCEL

To enter data
INPUT

INSERT

To insert every single code


into the program

DELETE

To delete code, data, block,


program

ALTER

To change program
number, input data

RESET

To terminate the current


operation

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

MANUAL DATA INPUT

MDI

Example for CNC Turning Program


O1234;
N10
G28 U0 W0;
N20
G92 S1200 M41 M03;
N30

G96 S400 T0404;

N40

G00 X2.6 Z0 M08;

N50

G01 X0.74 F0.5;

N60

G00 X3. Z5. M09;

N70
N80

G28 U0 W0;
M30;

Program name
Go to Reference point (Machine Zero position)
Max. spindle speed, 1200 RPM, Low gear, Spindle
CW
Constant surface speed, 400 RPM, Tool no. 4 with
tool offset no. 4
Rapid positioning(without cutting) to position
X=2.6, Z=0 in mm, coolant ON
Facing process tool will move to position X=0.74
with feed 0.5mm/min
Rapid positioning(without cutting) to position X=3,
Z5 in mm, coolant OFF
Go to Reference point (Machine Zero position)
End of program

10

MANUFACTURING AND MATERIALS DEPARTMENT

MME1103
Workshop Technology Manual
CNC Machining

CNC MILLING
Table 2: Basic Codes/ Basic Keys
G-code
Function
G00
Positioning (Rapid Traverse)
Linear Interpolation (Cutting
G01
Feed)
Circular Interpolation/Helical
G02
Interpolation CW
Circular Interpolation/Helical
G03
Interpolation CCW
G17
XY plane selection
G18
ZX plane selection
G19
YZ plane selection
G30
Return to reference point Z0
Cutter Diameter compensation
G40
OFF
Cutter Diameter compensation
G41
LEFT
Cutter Diameter compensation
G42
RIGHT
Tool length compensation +ve
G43
direction
Tool length compensation -ve
G44
direction
Tool length compensation
G49
CANCEL
Working coordinate system (1-6
G54-59
selection)
G70 or
Input in inch
G20
G71 or
Input in mm
G21

M-code
M00

Function
Program STOP

M01

Program STOP optional

M03

Spindle START CW

M04

Spindle START CCW

M05
M06
M08
M09

Spindle STOP
Tool Change
Coolant ON
Coolant OF

M30

END of program

Other
codes
N

Sequence Number

Feed (mm/min or
inch/min)

Tool number

End of block

U
V

G90

Absolute Dimension Input

G91

Incremental Dimension Input

G92

Position Set

I,J,K

G96

Constant Surface speed control

11

Incremental coordinate
for x-axis
Incremental coordinate
for y-axis
Incremental coordinate
for z-axis
Radius
Axis Interpolation
Parameter
Fixture Offset Selector
(Tool length)

MANUFACTURING AND MATERIALS DEPARTMENT

ABBREVIATION
POS

MME1103
Workshop Technology Manual
CNC Machining

SYMBOL

DESCRIPTION
POSITION:
Shows all coordinates
PROGRAM:
To open existing program,
load new program, edit
program
TOOL OFFSET SETTING:
Write mode selection,
manually input tool offset
data
To cancel input data
*same as backspace key in
computer keyboard
To enter data
To change program number,
input data
To insert every single code
into the program
To delete code, data, block,
program
To terminate the current
operation
MANUAL DATA INPUT

PROG

OFFSET SETTING

CAN
INPUT
ALTER
INSERT
DELETE
RESET
MDI

*NOTE: CNC milling and turning machine have the same basic keys. Refer to Table 1.
Example for CNC Milling Program
O1234;
N10
N20

G21 G40 G49;


G91 G30 Z0;

N30
N40
N50

T02 M06;
M03 S1000;
G43 H5 Z2.;

N60

G55 G90 G00 X0 Y0;

N70

G01 Z-5. F10;

N80
N90
N100
N110
N120

G01 X0 Y50. F100;


Y100.;
X100.;
X0;
G30 Z0

Name of program
Metric programming, tool compensation cancel
Incremental programming, Return to zero position
for z
Change tool no. 2
Spindle rotates clockwise 1000RPM
Tool length compensation +ve direction up to 2 mm
Working coordinate G55, Absolute programming,
Tool at X=0 Y=0 position
Cutting in Z-direction until it reaches z = 5mm
with feed 10mm/min
Cutting to Y-direction to Y=50 with 100mm/min
Cutting to Y-direction Y=100
Cutting to X-direction X=100
Cutting to X-direction X=0
Return to zero position for z
12

MANUFACTURING AND MATERIALS DEPARTMENT

N130

M30;

MME1103
Workshop Technology Manual
CNC Machining

End of program

Question
CNC Turning Center
1. List the steps of operating the machine starting with;
i.
ON/OFF the machine
ii.
Reference set-up
iii.
Tool offset set-up
2. Write a program on turning and facing process.
3. Give 3 advantages of using CNC turning machine compare to conventional machine.
CNC Machine Center
1. List the steps of operating the machine starting with;
iv.
ON/OFF the machine
v.
Reference set-up
vi.
Tool offset set-up
2. Write a program on facing process.
3. Give 3 advantages of using CNC milling machine compare to conventional machine.

13

You might also like