Beruflich Dokumente
Kultur Dokumente
CNC
MILLING
By
Page | I
Published by:
MTAB TRAINING CENTRE
Chennai 600 096
Copyright
No part of this publication may be reproduced in any form (including photocopying or
storing in any medium by electronic and whether or not to brief or incidentally to some other
use of this publication), without the prior permission of MTAB, MTAB holds the right to
modify or change any part of the document without notification. The authorized user of this
manual shall acquire no rights in respect of trademarks of other intellectual property rights
referred to herein which are shall remain the property of the owner thereof.
Page | II
Table of Content
PART PROGRAMMING FUNDAMENTALS
1
Pg. No
1
1.1
1.2
1.3
11
2.1
11
2.2
12
2.3
13
2.4
46
PROGRAMMING EXAMPLES
48
3.1
48
3.2
50
3.3
52
3.4
54
3.5
56
3.6
58
3.7
60
3.8
62
3.9
64
3.10
66
Page | III
3.11
68
3.12
70
3.13
72
74
4.1
75
4.2
77
4.3
82
4.4
83
4.5
84
4.6
85
86
Page | IV
CNC Milling
Part Programming Geometry
MTAB
Page | 1
CNC Milling
Part Programming Geometry
MTAB
The coordinate system for designating the axes is the conventional Right Hand Coordinate
System as shown in F1G.2. A labeling of the axes is a Right Hand Coordinate system
whenever the fingers of the right hand are aligned with the positive X axis and are then
rotated (through the smaller angle) toward the positive Y axis, then the thumb of the right
hand points in the direction of the positive Z axis. Otherwise, the orientation is a 'Left Hand
Coordinate System'.
Page | 2
CNC Milling
Part Programming Geometry
MTAB
Page | 3
CNC Milling
Part Programming Geometry
MTAB
The direction is positive (+) when the direction of rotation is clockwise as seen from the
Coordinate zero point looking in the direction of the positive axis as shown in the FIG.6
Page | 4
CNC Milling
Part Programming Geometry
MTAB
Page | 5
CNC Milling
Part Programming Geometry
MTAB
current slide and tool position data should be lost in the control system as, for example,
through an electrical failure, the machine must again be positioned to the reference point to
re-establish the proper positioning values.
Workpiece Zero Point (W)
This point determines the workpiece coordinate system in relation to the machine
zero point. The workpiece zero point is chosen by the programmer and input into the CNC
system when setting up the machine. The position of the workpiece zero point can be freely
chosen by the programmer within the workpiece envelope of the machine. It is, however,
advisable to place the workpiece zero point in such a manner that the dimensions in the
workpiece drawing can be conveniently converted into coordinate values and orientation
when clamping / chucking, setting up and checking, the traverse measuring system can be
affected easily. For milled parts, it is generally advisable to use an extreme corner point as the
"WorkPiece Zero Point" as shown in FIG.10. Occasionally, the workpiece zero point is also
called the Program zero point.
Page | 6
CNC Milling
Part Programming Geometry
MTAB
setting point during pre-setting. The tool setting point E is located at a certain point on the
tool holder as shown in FIG.11. This setting point permits measuring of tools away from the
CNC machine. The data thus measured such as tool length, tool point offset or tool radius are
input into the tool data storage (memory) of the control system. The mate of the tool setting
point is the Socket point N on the tool carrier. When the tool or tool holder is inserted into
the tool carrier (e.g., turret), the setting point and the tool socket point coincide.
When programming a workpiece contour, it is always the traverse of the tool cutting
edge that is of significance. The tool carrier, e.g., the main spindle on a milling machine,
must then move in a way that the tool cutting edge follows precisely in the desired contour.
Page | 7
CNC Milling
Part Programming Geometry
MTAB
Page | 8
CNC Milling
Part Programming Geometry
MTAB
The dimension lines run parallel to the coordinate axes and always start at the reference
point. Absolute dimensions are also called as Reference Dimensioning System.
Advantages of Absolute Dimensioning System
In case of interruptions that force the operator to stop the machine, the cutting toot
automatically returns to previous position, since it always moves to the absolute
coordinate called for, and the machining proceeds from the same block where it was
interrupted.
Possibility of easily changing the dimensional data in the part program whenever
required.
When describing contours and positions, it is always preferable to employ absolute
dimensions, because the first incorrect dimensioning of an individual point has no
effect on the remaining dimensions and the absolute system is easier to check for
errors.
2. Incremental Dimensioning System
When using incremental dimension system, every measurement refers to a previously
dimensioned position. Incremental dimensions are distance between adjacent points. These
distances are converted into incremental coordinates by accepting the last dimension point as
the coordinate origin for the new point. This may be compared to a small coordinate system,
i.e., shifted consequently form point to point (P1...P2... through P9) as shown in FIG.12.
Incremental dimensions are also called as Relative Dimensioning System or Chain
Dimensioning System.
Advantages of Incremental Dimensioning System
If manual programming is used, with incremental systems the inspection of the part
program, before punching the tape, is easy. Since the endpoint, when machining a
part, is identical to the starting point, the sum of the position commands (for each axis
separately) must be zero.
The performance of the incremental system can be checked by a closed-loop tape.
The last position command on the tape causes the table to return to the initial position.
CNC Related Dimensioning
Page | 9
CNC Milling
Part Programming Geometry
MTAB
Page | 10
CNC Milling
CNC Milling Programming
MTAB
Meaning
D&E
Feed
Unassigned
Unassigned
Block number
Program Number
P,Q,R
Spindle speed
Tool Function
Second movement parallel to X, Y, Z axes respectively
U,V,W
X
Movement in X-axis
Movement in Y-axis
Movement in Z -axis
Page | 11
CNC Milling
CNC Milling Programming
MTAB
All the CNC words may not be used on every CNC machine. Using these words, as an
example, the composition of a block is assembled as follows:
Every instruction contains all the words in the same sequence irrespective of the words being
the same as in the previous blocks. Hence, the identifying address letter need not be
provided. For example, if some coordinate values (i.e., x, y and z coordinates) remain
constant from one block to next block these values have to be specified in the next block
also. The data must be input in a specified sequence and characters within each word must be
of the same length.
Part Program Formats
Page | 12
CNC Milling
CNC Milling Programming
Example:
MTAB
N010 G00 X10 TAB Y5 TAB Z0 TAB F60 TAB S800 EOB
N020 G01 X20 TAB Z-0.5 EOB
Page | 13
CNC Milling
CNC Milling Programming
M Codes
M00
M01
M02
M03
M04
M05
M06
M08
M09
M10
M11
M13
M14
M19
M20
M21
M22
M23
M24
M25
M27
M30
M70
M71
M80
M81
M98
M99
M00
MTAB
Program Stop
By inserting M00 in a program, the cutting cycle is stopped after the block
containing M00 code. This facility is useful if an inspection check is necessary during
an operation. The cycle is then continued by a cycle start.
Example: M00
Page | 14
CNC Milling
CNC Milling Programming
M01
MTAB
Optional Stop
Cycle operation is stopped after a block containing M01 is executed. This
code is only effective when the optional stop switch on the machine control panel has
been pressed.
Example: M01
M02
Program End
M02 halts program execution. The spindle is turned off and the tool moves to
the most positive position on the Z axis.
Example: M02
M03
M04
M05
Spindle Stop
M05 commands instruction stop spindle rotation. It is good programming
practice to issue an M05 before a tool change, and at the end of a program.
Example: M05
M06
Tool Change
The M06 instruction causes the FANUC to change to a different tool.
Example: M06 T01
M08
M09
M10
M11
Coolant On
M08 turns the coolant on
Coolant Off
M09 turns the coolant off
Vice Open
M10 commands vice open
Vice Close
M11 commands vice close
Page | 15
CNC Milling
CNC Milling Programming
M13
MTAB
M14
M19
M20
M21
M22
M23
M24
M25
M27
M30
Spindle Orientation
Ml9 orientates the spindle.
ATC Arm in
M20 moves the ATC arm in. It moves the arm towards the spindle.
ATC Arm out
M21 moves the ATC arm out. It retracts the arm from the spindle.
ATC Arm down
M22 moves the ATC arm down.
ATC Arm up
M23 moves the ATC arm up.
ATC draw bar clamping (Manual)
M24 clamps the ATC draw bar
ATC draw bar releasing (Manual)
M25 releases the draw bar.
Reset ATC
M27 command used for ATC reset position.
Program Stop and Rewind
This command is used to stop the spindle, turns the coolant off, terminates and
reset the CNC program.
M32
M33
M38
M38
M62
Page | 16
CNC Milling
CNC Milling Programming
M63
MTAB
Auxiliary output 2 on
M63 sets auxiliary output 2 on. This command mainly used in Flexible
Manufacturing System (FMS) / Computer Integrated Manufacturing (CIM) System.
M64
M65
Auxiliary output 2 on
M65 sets auxiliary output 2 off. This command mainly used in Flexible
Manufacturing System (FMS) / Computer Integrated Manufacturing (CIM) System.
M70
X Mirror On
M70 command is used for X axis mirroring about the current X axis position
M71 Y Mirror On
M70 command is used for Y axis mirroring about the current Y axis position
M80 X Mirror Off
M80 command is used for X axis mirroring off.
M81 Y Mirror On
M81 command is used for Y axis mirroring off.
M98 Sub-Program Call
Format: M98 P1112222
Subprogram
Call
M99
Number of
repetition (3 Digit
shown in red color)
Subprogram
Number (Four
Digit shown in
blue color)
Sub-Program Exit
Page | 17
CNC Milling
CNC Milling Programming
MTAB
G CODE
Group
Function
G00*
G0l*
G02
01
G03
G04
G17*
G18
02
06
G42
Input in inch
Input in mm
00
G40*
G41
ZX plane selection
YZ plane selection
G21
G28
G19
G20
07
G43
Tool length compensation + direction
Miscellaneous and Preparatory Functions
Page | 18
CNC Milling
CNC Milling Programming
G44
MTAB
08
G49*
G50
11
G51
Scaling Off
Scaling On
G54
14
Datum Shift
G68
16
Rotation On
G69
Rotation Off
G73
G74
G76
Fine boring
G80*
G81
G82
09
G83
G84
R.H.Tapping cycle
G85
G86
G87
G88
Boring cycle
G89
G90*
03
G91
G94
G95
G98*
G99
10
Page | 19
CNC Milling
CNC Milling Programming
MTAB
A G00 moves the tool to a certain position in the work coordinate system with an absolute
command or to a position specified distance from the current position with an incremental
command at a rapid traverse rate.
Format: G00 X_ _ Y _ _ Z _ _
Example: G00 X20 Y30 Z10
Here the tool is moved to X30mm, Y30mm and Z10mm
Notes on G00:
The rapid traverse rate in the G00 command is set for each axis independently by the
machine tool builder. Accordingly, the rapid traverse rate cannot be specified in the
address F.
In the positioning mode actuated by G00, the tool is accelerated to a predetermined
speed at the start of a block and is decelerated at the end of block. Execution proceeds
to the next block after confirming the in-position.
Page | 20
CNC Milling
CNC Milling Programming
MTAB
This command actuates the linear interpolation mode. The values of X, Y, and Z define the
distance of tool travel which will be conducted in absolute or incremental mode, according to
the current status of G90 / G91. The feed rate is set to a cutting feed speed commanded by F
code and is a modal data. The feed rate commanded by the F code is measured along the tool
path. If it is not commanded, the feed rate of each axis direction is as follows.
Format: G01 X_ _ Y _ _ Z _ _ F _ _
Example: G01 X20 Y30 Z-1 F80
Circular Interpolation
The tool traverses from a starting point to a given target point along a circular path,
and then it is called circular interpolation. This can be specified by either clockwise or
anticlockwise direction. The following data are required to make a circular interpolation.
Page | 21
CNC Milling
CNC Milling Programming
Sl.No:
Data to be
given
MTAB
Command
Command
Meaning
G17
Arc specification
on XY Plane
Arc specification
on ZX Plane
Arc specification
on YZ Plane
Clockwise (CW)
Counter
Clockwise(CCW)
End point position
in the Work
Coordinate system
Distance from start
point to end point
The signed
distance from start
point to centre
Arc radius
Velocity along arc
G18
01.
Plane Selection
G19
G02
02.
03.
Direction of
Rotation
End Point
G90 Mode
Position
04.
05.
G91 Mode
G03
Two of the X, Y and
Z axes
ARC Radius
Feed Rate
R
F
The view is from the positive direction of the Z axis (Y axis or X axis) to the negative
direction on XY plane (ZX plane or YZ plane) in the right hand cartesian coordinate system.
Fig. shows the CW and CCW directions in different plane. The end of an arc is specified by
address X, Y or Z and is expressed as an absolute or incremental value according to G90 or
G91. For the incremental value, the coordinate of the end point which is viewed from the
start point of the arc is specified.
The arc centre are specified by addresses I, J and K for the X, Y and Z axes
respectively. The numerical value following I, J and K however is a vector component in
which the arc centre is seen from the start point, and is always specified as an incremental
value irrespective of G90 and G91, as shown in fig. I, J and K must be signed according to
the direction. The radius can be specified with address R instead of specifying the centre by I,
J and K. when an arc is exceeding 180 is commanded, the radius must be negative value.
Page | 22
CNC Milling
CNC Milling Programming
MTAB
G04 Dwell
The command G04 causes the program to wait for a specified amount of time. The
time can be specified in seconds with the X prefixes or in milliseconds with the P prefix.
One of the uses of this code is to get a sharp corner on the profile of the workpiece in cutting
feed. It is also used at the end of drilling cycle. During cutter motion, a deceleration at the
end of the motion specified by one statement and acceleration at the start of the motion
specified by the next statement are usually applied automatically by the controller.
Example:
G04
X1.5
G04
P1500
Page | 23
CNC Milling
CNC Milling Programming
MTAB
safety reasons the cutter radius compensation, and tool length compensation should be
canceled before executing this command.
Example: G91 G28 X0 Y0 Z0 Makes the cutting tool to move to Reference point directly.
G40 Cutter radius Compensation Cancel
The commands G40 deactivate the cutter radius compensation.
G41 Cutter radius Compensation Left
The command G41 activate tool radius compensation left, tool operates in machining
operation to the left side of the profile or contour (Fig.a)
G42 Cutter radius Compensation Right
The command G42 activate tool radius compensation right, tool operates in
machining operation to the right side of the profile or contour (Fig.b)
G50 Scaling Off: This command enables cancel the scaling command.
G51 Scaling On: This command enables the size of the profile size to be increased or
decreased.
G54 Datum Shift: This command is used to shift the profile along X axis or Y axis.
G68 Rotation On: This command can rotate a programmed shape at a specified angle.
G69 Rotation Off: This command enables cancel the coordinate system rotation.
Miscellaneous and Preparatory Functions
Page | 24
CNC Milling
CNC Milling Programming
MTAB
Canned Cycles
To simplify programming, the canned cycle command can execute the specific
operation using one G code, instead of several separated G code commands in the program.
Operation
Description
1.
2.
3.
Hole machining
4.
5.
Retraction to R point
6.
The G codes from G73 to G89 are reserved for various canned cycles. It may be
drilling, boring, tapping etc.
In general, canned cycle consists of six operations as shown below.
Page | 25
CNC Milling
CNC Milling Programming
MTAB
_X_Y_Z_R_Q_P_F_K_
G99
Explanation of the parameters
G98 - Return to initial point in a canned cycle
G99 - Return to R point in a canned cycle
The other parameters would be explained in the specific canned cycle.
Function:
Page | 26
CNC Milling
CNC Milling Programming
MTAB
Feed rate
Page | 27
CNC Milling
CNC Milling Programming
MTAB
Function
When drilling a deep hole, the drill should be retracted occasionally to avoid
congestion of chips between the hole and the drill. Since the Z axis direction intermittent feed
simplifies chip disposal and permits a very small retraction value to be set in deep whole
drilling, efficient machining is performed. Here the retraction is performed at the rapid rate.
Example:
M03 S1200
G90 G00 X10 Y10 Z10
G99 G73 X10 Y10 Z-2 R1 P500 Q1 F80 K1
G80
Thread lead
Page | 28
CNC Milling
CNC Milling Programming
MTAB
Operation Sequence
1) Rapid position to X, Y and Z (the Initial level).
2) Rapid traverse to R point level.
3) Feed to Z depth.
4) Dwell P (time for spindle stop and start CW direction).
5) Feed to R point level.
6) Dwell P (time for spindle stop and start CCW direction).
Note: During G74, the feed rate override is ignored and the cycle does not stop until the end
of the return operation, even if a feed hold is applied.
Example:
M04 S200
G90 G00 X10 Y10 Z10
G99 G74 X10 Y10 Z-12 R1 P500 F80
G80
Page | 29
CNC Milling
CNC Milling Programming
MTAB
Thread lead
Page | 30
CNC Milling
CNC Milling Programming
MTAB
Function:
This cycle is commanded in single block. Since a spindle oriented stop is performed
at the bottom of the hole and the spindle retracts after shifting in the direction opposite to the
cutter-direction, high precision and efficient boring is performed without scratching the work
piece.
Note: the shift value is specified by Q. the Q value is always a positive value. If a negative
value is specified, the sign is ignored. The Q value is modal in the canned cycle.
Example:
M03 S200
G90 G00 X0 Y20 Z10
G99 G76 X20 Y20 Z-16 Q0.5 R-10 F60
Feed rate
Page | 31
CNC Milling
CNC Milling Programming
MTAB
Function
G81 command can be used to drill a hole. The tool is moved with feed rate when it is
drilling a hole. Then, the tool is moved at the rapid rate when it is retracting from the bottom
of the hole.
Example:
M03 S1200
G90 G00 X0 Y20 Z10
G99 G81 X20 Y20 Z-8 R1 F60 K1
F
Feed rate
Miscellaneous and Preparatory Functions
Page | 32
CNC Milling
CNC Milling Programming
K
MTAB
Function
G82 command can be used to drill a counter bore.
Example:
M03 S1200
G90 G00 X0 Y20 Z10
G99 G82 X20 Y20 Z-8 P500 R1 F60 K1
Page | 33
CNC Milling
CNC Milling Programming
F
Feed rate
MTAB
Function
G83 command can perform a peck drilling. The intermittent feed allows the operator
to remove the chips from the drill.
Example:
M03 S1200
G90 G00 X10 Y10 Z10
G99 G83 X10 Y10 Z-2 R1 P500 Q1 F80 K1
G80
R
Z coordinates of the R point
Miscellaneous and Preparatory Functions
Page | 34
CNC Milling
CNC Milling Programming
P
Thread lead
MTAB
Function
R.H Tapping is performed by spindle rotation clockwise. Then the spindle turns
counter clockwise for retraction when the tool reaches the bottom of the hole.
Note: During G84, the feed rate override is ignored and the cycle does not stop until the end
of the return operation, even if a feed hold is applied.
Example:
M03 S200
G90 G00 X10 Y10 Z10
G99 G84 X10 Y10 Z-12 R1 P500 F80
G80
Page | 35
CNC Milling
CNC Milling Programming
MTAB
Feed Rate
Function
G85 command is used to increase diameter of the previous drilling.
Page | 36
CNC Milling
CNC Milling Programming
MTAB
Feed Rate
Function
G86 command is used to increase diameter of the previous drilling.
Page | 37
CNC Milling
CNC Milling Programming
MTAB
Feed Rate
Function
G87 command is used to bore a pervious drill hole.
Page | 38
CNC Milling
CNC Milling Programming
MTAB
Feed Rate
Function:
G88 command can be used to bore a hole precisely. The main difference is that the
tool is returned to the initial point or the point R in the manual mode key (On the machine
control panel).
Page | 39
CNC Milling
CNC Milling Programming
MTAB
Feed Rate
Function
G89 command is used to bore a pervious drill hole.
Page | 40
CNC Milling
CNC Milling Programming
MTAB
Page | 41
CNC Milling
CNC Milling Programming
MTAB
Canned Cycles
G code
G73
Drilling
Operation at the
Retraction
(-Z direction)
bottom of a hole
(+Z direction)
Intermittent
Rapid traverse
feed
G74
Feed
Feed
Dwell
Spindle
Feed
CW
G76
Application
Left hand
tapping
Oriented spindle
Rapid traverse
stop
G80
Cancel
G81
Feed
Rapid traverse
Drilling cycle,
spot drilling
cycle
G82
Feed
Dwell
Rapid traverse
Drilling cycle,
counter drilling
cycle
G83
Intermittent
Rapid traverse
feed
G84
Feed
Peck drilling
cycle
Dwell
Spindle
Feed
Tapping cycle
CW
G85
Feed
Feed
Boring cycle
G86
Feed
Spindle stop
Rapid traverse
Boring cycle
G87
Feed
Spindle CW
Rapid traverse
Back boring
cycle
G88
Feed
Dwell
Spindle
Manual
Boring cycle
Feed
Boring cycle
Stop
G89
Feed
Dwell
Page | 42
CNC Milling
CNC Milling Programming
MTAB
Machining Cycles
Circular Pocket Milling Cycle - Format
G170
P Q R X Y Z I J K
G171
P S R F B J
P0 -
ROUGHING OPERATION
P1 -
FINISHING OPERATION
Q-
R-
REFERENCE POINT
X-
Y-
Z-
TOTAL DEPTH
I-
J-
K-
P-
S-
R-
F-
B-
J-
Page | 43
CNC Milling
CNC Milling Programming
MTAB
ROUGHING OPERATION
P1-
FINISHING OPERATION
Q-
R-
REFERENCE POINT
X-
Y-
Z-
TOTAL DEPTH
I-
J-
K-
I-
K-
P-
S-
T-
TOOL NUMBER
R-
F-
B-
J-
Z-
SAFETY POSITION
Page | 44
CNC Milling
CNC Milling Programming
MTAB
O1000
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G00 X0 Y0
Z5
just above the billet. This point is called as the Tool entry Point.
Page | 46
CNC Milling
CNC Milling Programming
MTAB
G91 G28 Z0
G28 X0 Y0
M05
M30
Page | 47
CNC Milling
Programming Examples
MTAB
3. Programming Examples
3.1 Example # 01: Programming using linear and circular interpolation
Write a manual part program for Profile Milling Operation for the component shown
in DWG.NO: 01.
DWG.NO: 01
MATERIAL: Aluminium
DWG. NO: 01
Sl.No:
Example Program
Slot Drill
Cutter
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
100
Page | 48
CNC Milling
Programming Examples
MTAB
O1001
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X-30 Y-20 Z5
G01 Z-1 F100
G01 X-30 Y20
G02 X-20 Y30 R10
G01 X20 Y30
G03 X30 Y20 R10
G01 X30 Y-20
G01 X20 Y-30
G01 X-20 Y-30
G03 X-30 Y-20 R10
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 49
CNC Milling
Programming Examples
MTAB
DWG.NO: 02
MATERIAL: Aluminum
DWG. NO: 02
Sl.No:
Tool
Tool
Spindle Feed,
Station Length Speed, mm/min
No.1
Offset RPM
No.1
Operation
Profile
Slot Drill
Milling using Cutter
Sub-Program
Example Program
1500
100
Page | 50
CNC Milling
Programming Examples
MTAB
O1002
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X-30 Y-20 Z5
G01 Z0 F100
M98 P52233
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
O2233
G91 G01 Z-1 F100
G90 G01 X-30 Y20
G02 X-20 Y30 R10
G01 X20 Y30
G03 X30 Y20 R10
G01 X30 Y-20
G01 X20 Y-30
G01 X-20 Y-30
G03 X-30 Y-20 R10
M99
Example Program
Page | 51
CNC Milling
Programming Examples
MTAB
DWG.NO: 03
MATERIAL: Aluminium
DWG. NO: 03
Sl.No:
Example Program
Slot Drill
Cutter
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
100
Page | 52
CNC Milling
Programming Examples
MTAB
O1003
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
M98 P2244
M70
M98 P2244
M80
M71
M98 P2244
M81
M70
M71
M98 P2244
M80
M81
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
O2244
G90 G00 X15 Y15 Z5
G01 Z-1 F100
G01 X15 Y25
G01 X25 Y25
G01 X25 Y15
G01 X15 Y15
G00 Z5
G00 X0 Y0
M99
Example Program
Page | 53
CNC Milling
Programming Examples
MTAB
DWG.NO: 04
MATERIAL: Aluminium
DWG. NO: 04
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 54
CNC Milling
Programming Examples
MTAB
O1004
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X0 Y0 Z5
G170 P0 Q1 R0.5 X0 Y0 Z-4 I0.1 J0.1 K25
G171 P50 S1200 R60 F100 B1500 J60
G170 P1 Q1 R0.5 X0 Y0 Z-4 I0 J0 K25
G171 P50 S1200 R60 F100 B1500 J60
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 55
CNC Milling
Programming Examples
MTAB
DWG.NO: 05
MATERIAL: Aluminium
DWG. NO: 05
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 56
CNC Milling
Programming Examples
MTAB
O1005
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X0 Y0 Z5
G172 P0 Q1 R0.5 X-25 Y-17.5 Z-4 I50 J35 K0
G173 P50 S1200 T1 R60 F100 B1500 J60 Z5 I0.1 K0.1
G172 P1 Q1 R0.5 X-25 Y-17.5 Z-4 I50 J35 K0
G173 P50 S1200 T1 R60 F100 B1500 J60 Z5 I0 K0
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 57
CNC Milling
Programming Examples
MTAB
DWG.NO: 06
MATERIAL: Aluminium
DWG. NO: 06
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 58
CNC Milling
Programming Examples
MTAB
O1006
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X25 Y25 Z5
G01 Z2 F100
G73 G99 X25 Y25 Z-5 Q1 R0.5 F80 K1
X-25 Y25
X-25 Y-25
X25 Y-25
G00 Z5
G80
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 59
CNC Milling
Programming Examples
MTAB
DWG.NO: 07
MATERIAL: Aluminium
DWG. NO: 07
Sl.No: Operation
Tool
Type
Slot Drill 6
Cutter
Drilling on
PCD
Example Program
Tool
Dia.,
mm
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
100
Page | 60
CNC Milling
Programming Examples
MTAB
O1007
G21 G94
G91 G28 Z0
G28 X0 Y0
= PCD / 2 SIN45
= 70 / 2 SIN45
= 24.748
= PCD / 2 COS45
= 70 / 2 COS45
= 24.748
M06 T1
M03 S1500
G90 G00 X35 Y0 Z5
G73 G99 X35 Y0 Z-5 Q1 R0.5 F80 K1
X24.748 Y24.748
X0 Y35
X-24.748 Y24.748
X-35 Y0
X-24.748 Y-24.748
X0 Y-35
X24.748 Y-24.748
G00 Z5
G80
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 61
CNC Milling
Programming Examples
MTAB
3.8 Example # 08: Programming for Datum Shift Operation using G54
Write a manual part program for Datum Shift Operation for the component shown in
DWG.NO: 08.
DWG.NO: 08
MATERIAL: Aluminium
DWG. NO: 08
Sl.No:
Example Program
Tool
Tool
Spindle Feed,
Station Length Speed, mm/min
No.1
Offset RPM
No.1
1
1500
100
Page | 62
CNC Milling
Programming Examples
MTAB
O1008
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X10 Y10 Z5
G54 X10 Y10
M98 P5566
G00 Z5
G90 G00 X-30 Y10
G54 X-30 Y10
M98 P5566
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
O5566
G90 G00 Z-1 F100
G01 X0 Y10
G01 X10 Y10
G01 X10 Y0
G01 X0 Y0
G00 Z5
G54 X0 Y0
M99
Example Program
Page | 63
CNC Milling
Programming Examples
MTAB
3.9 Example # 09: Programming for Drilling operation using Rotation Command (G68)
Write a manual part program for Drilling Operation using Rotation command for the
component shown in DWG.NO: 09.
DWG.NO: 09
PLANNING AND OPERATIONS SHEET
BILLET SIZE: 90 x 90 x 10
MATERIAL: Aluminium
DWG. NO: 09
Sl.No:
Tool
Tool
Spindle Feed,
Station Length Speed, mm/min
No.1
Offset RPM
No.1
Example Program
Slot Drill
Cutter
1500
100
Page | 64
CNC Milling
Programming Examples
MTAB
O1009
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X35 Y0 Z5
G68 R0
M98 P6677
G68 R45
M98 P6677
G68 R90
M98 P6677
G68 R135
M98 P6677
G68 R180
M98 P6677
G68 R225
M98 P6677
G68 R270
M98 P6677
G68 R315
M98 P6677
G00 Z5
G69
G91 G28 Z0
G28 X0 Y0
M05
M30
O6677
G73 G99 X35 Y0 Z-5 Q1 R0.5 F80 K1
G00 Z5
G80
M99
Example Program
Page | 65
CNC Milling
Programming Examples
MTAB
DWG.NO: 10
MATERIAL: Aluminium
DWG. NO: 10
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 66
CNC Milling
Programming Examples
MTAB
O1010
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
M98 P7777
G90 G00 Z5
M98 P8888
G90 G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
O7777
G90 G00 X-30 Y-20 Z5
G01 Z-1 F100
G01 X-30 Y20
G02 X-20 Y30 R10
G01 X20 Y30
G03 X30 Y20 R10
G01 X30 Y-20
G01 X20 Y-30
G01 X-20 Y-30
G03 X-30 Y-20 R10
M99
O8888
G51 P0.5
M98 P7777
G00 Z5
G50
M99
Example Program
Page | 67
CNC Milling
Programming Examples
MTAB
3.11 example # 11: Programming for Profile Milling using ATC option
Write a manual part program for Scaling Command for the component shown in
DWG.NO: 11.
DWG.NO: 11
PLANNING AND OPERATIONS SHEET
BILLET SIZE: 90 x 90 x 10
MATERIAL: Aluminium
DWG. NO: 11
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
Profile
Milling
Operation
Slot Drill
Cutter
1500
100
Profile
Milling
Operation
Slot Drill
Cutter
10
1200
80
Example Program
Page | 68
CNC Milling
Programming Examples
MTAB
O1011
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 X-30 Y-20 Z5
G01 Z-1 F100
G01 X-30 Y20
G02 X-20 Y30 R10
G01 X20 Y30
G03 X30 Y20 R10
G01 X30 Y-20
G01 X20 Y-30
G01 X-20 Y-30
G03 X-30 Y-20 R10
G00 Z5
G91 G28 Z0
G28 X0 Y0
M06 T2
M03 S1200
G90 G00 X-20 Y0 Z5
G01 Z-1 F100
G02 X20 Y0 R10
G02 X-20 Y0 R10
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 69
CNC Milling
Programming Examples
MTAB
DWG.NO: 12
PLANNING AND OPERATIONS SHEET
BILLET SIZE: 90 x 90 x 10
MATERIAL: Aluminium
DWG. NO: 12
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 70
CNC Milling
Programming Examples
MTAB
O1012
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 G41 X0 Y0 Z10
G01 X-30 Y-20 F100
G01 Z5 F100
G01 Z-1 F100
G01 X-30 Y20
G02 X-20 Y30 R10
G01 X20 Y30
G03 X30 Y20 R10
G01 X30 Y-20
G01 X20 Y-30
G01 X-20 Y-30
G03 X-30 Y-20 R10
G01 X-30 Y0
G40
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 71
CNC Milling
Programming Examples
MTAB
3.13 example # 13: Programming for Profile Milling Operation using G42
Write a manual part program for Profile Milling Operation with cutter radius
compensation right (G42) for the component shown in DWG.NO: 13.
DWG.NO: 13
MATERIAL: Aluminium
DWG. NO: 13
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Example Program
Slot Drill
Cutter
100
Page | 72
CNC Milling
Programming Examples
MTAB
O1013
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 G42 X0 Y0 Z10
G01 X30 Y-20 F100
G01 Z-1 F100
G01 X30 Y20
G02 X20 Y30 R10
G01 X-20 Y30
G03 X-30 Y20 R10
G01 X-30 Y-20
G02 X-20 Y-30 R10
G01 X20 Y-30
G01 X30 Y-20
G01 X30 Y0
G40
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Example Program
Page | 73
CNC Milling
Machine Room Exercises
MTAB
CNC Milling
Machine Room Exercises
Page | 74
CNC Milling
Machine Room Exercises
MTAB
Units
XLMILL
X Axis Travel
mm
225
Y Axis Travel
mm
150
Z Axis Travel
mm
115
Travels
70 - 185
mm
360 x 132
HP
0.5
Programmable Spindle
rpm
150 - 4000
BT 30
Positional Accuracy
mm
0.01
Repeatability
mm
0.005
m / min
1.2
mm / min
0 - 1200
Pcs
mm
16
mm
40
Spindle
Speed
Spindle Nose Taper
Accuracy
Feed Rate
Rapid Traverse X x Y x Z
axes
Programmable Feed Rate on
X x Y x Z axes
ATC
Page | 75
CNC Milling
Machine Room Exercises
ATC Direction
MTAB
-
Bi-Directional
Slides
Slides
Ball Screws X, Y and Z axes
16mm x 5mm
CNC
Control System
Path
Lubrication
Lubrication System
Power Source
Main Supply
Machine Dimensions
Height x Length x Depth
mm
Machine Weight
kg
170
Optional Accessories
CAM Software, Offline Programming Software, Auto Door, Hydro Pneumatic
Vise, Work Bench, 3 axis Loading / Unloading Arm, 6 station ATC, Stabilizer,
Air Compressor
Features
Compatible / Upgradable
Page | 76
CNC Milling
Machine Room Exercises
MTAB
Ex # 02: Study of Tool Offset Procedures for XL MILL CNC Vertical Machining
Centre
Tool offset procedures:
Select Tool Offsets from Job/Tooling Main Menu.
After Selecting Tool offsets the following window appears. Choose required tool
position and Double Click on it. The following window appears on the screen.
Manually enter TOOL RAD and ACTUAL DIAM.
Then Add Tool To Library. The following window appears and Click OK on CNC
TRAINER SETTINGS.
The Selected Tool should be brought either rapidly or manually Nearer to the left
edge of the billet using all the three axes.
Page | 77
CNC Milling
Machine Room Exercises
MTAB
Move the Tool in JOG Mode with Appropriate Displacement until tool touches the
edge of the billet as shown below.
Now Select DATUM and then Click X axis on the CNC DISPLAY which will turn
into ZERO indicating the point has been made Zero in X axis.
Page | 78
CNC Milling
Machine Room Exercises
MTAB
Lift the Tool away from the billet by using Manual mode equal to the radius of the cutter in
X + direction and Select Datum and Click on X axis on the CNC DISPLAY which will turn
into ZERO indicating the point has been made Zero in X axis.
Repeat the Procedure for taking the Offset in Y axis also.
For taking Z axis offset, bring the cutter to the surface of the billet by using JOG Mode. As
the cutter touches the billet Select Datum and Click on Z axis on the CNC DISPLAY which
will show Zero.
Offset for all the subsequent tools in Z axis are to be taken based on the Length of first tool.
Procedures:
Page | 79
CNC Milling
Machine Room Exercises
MTAB
Select Tool Type as per the Program and Select Tooling form CNC TRAINER
SETTINGS; choose required tool and Double Click on it. The following window
appears on the screen.
For taking Z axis offset, bring the cutter to the surface of the billet by using JOG Mode. As
the cutter touches the billet lick on Z LENGTH on the CNC TRAINER SETTING which will
show offset value with respect to first tool.
Page | 80
CNC Milling
Machine Room Exercises
MTAB
NOTE:
X and Y offsets remains same for all the tool
Page | 81
CNC Milling
Machine Room Exercises
MTAB
Ex # 03: Write a manual part program for machining the component shown in
DWG.NO: 03.
Profile Depth: 5 mm
DWG.NO: 03
MATERIAL: Aluminium
PROGRAM NO: 03
DWG. NO: 03
Sl.No:
Slot Cutter 6
Tool
Tool
Spindle Feed,
Station Length Speed, mm/min
No.1
Offset RPM
No.1
1
1500
100
Page | 82
CNC Milling
Machine Room Exercises
MTAB
Ex # 04: Write a manual part program for machining the component shown in
DWG.NO: 04.
Profile Depth: 5 mm
DWG.NO: 04
MATERIAL: Aluminium
PROGRAM NO: 04
DWG. NO: 04
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
1500
Slot Cutter 6
100
Page | 83
CNC Milling
Machine Room Exercises
MTAB
Ex # 05: Write a manual part program for machining the component shown in
DWG.NO: 05.
Profile Depth: 5 mm
DWG.NO: 05
PLANNING AND OPERATIONS SHEET
BILLET SIZE: 90 x 90 x 10
MATERIAL: Aluminium
PROGRAM NO: 05
DWG. NO: 05
Sl.No:
Tool
Tool
Station Length
No.1
Offset
No.1
Spindle Feed,
Speed, mm/min
RPM
Drilling
Operation
Slot Cutter 6
1500
100
Drilling
Operation
Slot Cutter 10
1200
80
Page | 84
CNC Milling
Machine Room Exercises
MTAB
Ex # 06: Write a manual part program for machining the component shown in
DWG.NO: 06.
DWG.NO: 06
MATERIAL: Aluminium
PROGRAM NO: 06
DWG. NO: 06
Sl.No:
Operation
Circular
Pocket
Milling
Operation
1500
100
Page | 85
CNC Milling
MTAB
Page | 86
CNC Milling
MTAB
DOS
Always make sure all Tools are Securely Clamped in Position
Always Consult your Authority when in Doubt
Always make sure all Tool Mounting Surfaces are clean before Mounting Tools
Always Replace Blown Fuses with Fuses of the Same Capacity
Switch off Power during Maintenance / Repair work
Negligence on the above points can cause Personal Injury and Machine Damage
Page | 87