CNC Mill Programming
CNC Mill Programming
by P.N.Rao
x
x
x
x
x
x
x
x
Process planning
Axes selection
Tool selection
Cutting process parameters planning
Job and tool setup planning
Machining path planning
Part program writing
Part program proving
Fig. 13.1
Description
Tools
* axes motion
* datums and positioning home
* geometry symmetrical
* reference plane, z to surface
Fig. 13.3 Part for NC machining shown with axes system at the centre
Fig. 13.4
Same part as in Fig. 13.3 but with axes system at the bottom
left corner
* complex, cycles
* format / syntax
* trial run
* graphical simulation
* damanges of tool
Fig. 13.5
* handbook/feed/speed
Fig. 13.6
Character
A
B
Address For
Angular dimension around X axis
Angular dimension around Y axis
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
* x, y
* F word address
* modal / 150 mm/min
* S / rpm
CODE
G00 *
G01 *
G02 *
G03 *
G04
G05
G06
G07
G08
G09
G10
inches)
G11
G12
G13-G16
G17
G18
G19
G20
G21
G22-G29
G30
G31
G32
G33
G34
G35
G36-G39
G40 *
G41 *
G42 *
G43
G44
* tool magazines, T
* denotes G
* G codes, pre-set functions
* modal mostly
FUNCTION
Point-to-point positioning, rapid traverse
Line interpolation
Circular interpolation, clockwise (WC)
Circular interpolation, anti-clockwise (CCW)
Dwell
Hold/Delay
Parabolic interpolation
Unassigned
Acceleration of feed rate
Deceleration of feed rate
Linear interpolation for long dimensions (10 inches-100
Linear interpolation for short dimensions (up to 10 inches)
Unassigned
Axis designation
XY plane designation
ZX plane designation
YZ plane designation
Circular interpolation, CW for long dimensions
Circular interpolation, CW for short dimensions
Unassigned
Circular interpolation, CCW for long dimensions
Circular interpolation, CCW for short dimensions
Unassigned
Thread cutting, constant lead
Thread cutting, linearly increasing lead
Thread cutting, linearly decreasing lead
Unassigned
Cutter compensation-cancels to zero
Cutter radius compensation-offset left
Cutter radius compensation-offset right
Cutter compensation-positive
Cutter compensation-negative
G45-G52
G53
G54-G59
G60
G61
G62
G63
G64
G65-G69
G70
G71
G72-G79
G80
G81-G89
G90
G91
G92
G93
G94
G95
G96
G97
G98-G99
Unassigned
Deletion of zero offset
Datum point/zero shift
Target value, positioning tolerance 1
Target value, positioning tolerance 2, or loop cycle
Rapid traverse positioning
Tapping cycle
Change in feed rate or speed
Unassigned
Dimensioning in inch units
Dimensioning in metric units
Unassigned
Canned cycle cancelled
Canned drilling and boring cycles
Specifies absolute input dimensions
Specifies incremental input dimensions
Programmed reference point shift
Unassigned
Feed rate/min (inch units when combined with G70)
Feed rate/rev (metric units when combined with G71)
Spindle feed rate for constant surface feed
Spindle speed in revolutions per minute
Unassigned
Motion group
*G00
G01
G02
G03
Rapid Positioning
Linear Interpolation
Circular interpolation Clockwise
Circular interpolation Counter clockwise
Dwell
G04
Dwell
Units group
*G70
G71
Inch units
Metric units
* default G17
Fig. 13.8
Fig. 13.9
* modal
* rapid rate, movement in air
* save time
Absolute programming A to B
N110 G90 G00 X50.0 Y45.0 Z 40.0
N120 X90.0 Y90.0 Z70.0
* material to be cut
* modal
Dwell, G04
CODE
FUNCTION
* control on M/C
M00
M01
M02
M03 *
M04
M05 *
M06 *
M07
M08
M09
M10
M11
M12
M13
M14
M15
M16
M17-M18
M19
M20-M29
M30 *
M31
M32-M35
M36-M39
M40-M45
M46-M49
M50
M51
M52-M54
M55
M56
M57-M59
M60
M61
M62
M63-M67
M68
M69
M70
M71
M72
M73-M77
M78
M79
M80-M99
Fig. 13-21 Tool path for machining the component for example 13.2
Fig. 13-22 Offset Tool path for machining contours that are not parallel to
the principal axes * G41
* repeated no of times
* drilling & tapping
*
*
Cann
ed
cycle
numb
er
Feed from
surface
G80
G81
G82
G83
G84
G85
G86
G87
G88
G89
Off
Constant
Constant
Intermittent
Constant
Constant
Constant
Constant
Constant
Constant
At programmed depth
(end of feed point)
Dw
ell
Spindle
return
motion
-Stop
-Rapid
--Rapid
Yes -Rapid
--Reverse Feed
-Feed
--Rapid
Stop
-Manual
Stop
-Manual
Yes Stop
Feed
Yes --
Used for
Spindle
speed
Fig. 13.28 Example showing the cutter radius compensation using the G
codes G42
Fig. 13.29 Example showing the cutter radius compensation using the G
codes G41 and G42
Fig. 13.30 Example for contour programming using the cutter radius
compensation