Chapter 3.Cnc Part Programming
Chapter 3.Cnc Part Programming
CNC PART
PROGRAMMING
Co:-Develop part program for CNC Turning, Milling and verify on
simulation software.
Block Format:
1. Fixed sequential format
2. Tab sequential format
3. Word address format
EXAMPLE:
Assume that a drilling operation is to be
programmed as:
Sample Block
N135 G01 X1.0 Y1.0 Z0.125 F5
25
B C
20
15
5 10 15 20 25 30
G01 Linear Interpolation
N10 G00 X1 Z1
X
N15 Z0.1
N20 G01 Z-0.125 F5
N25 X2 Z2 F10
Z
G02 Circular Interpolation
• G02 is also a preparatory function to specify
that the tool should be moved to a specified
location along a circular path in a clockwise
direction. In order to specify the path to the
MCU, the end point of the arc and the location
of the center of the arc should be specified.
Within the block in which the G02 code is
programmed, the center of the arc is given by
specifying its location relative to the start of the
arc.
G02 Circular Interpolation (CW)
I=5 A C
20
15
J=15
10 B
C
5
5 10 15 20 25 30
Canned Cycles
The sequence of some machining operations is may be
the same for any part and for any machine. For example,
drilling a hole involves the following steps:
Position the tool above the point where the hole will be
drilled
%
:1002
N5 G90 G20
N10 M06 T1
N15 M03 S1200
N20 G00 X0.125 Y0.125
N30 Z0.125
N35 G01 Z-0.125 F5
N40 X3.875
N45 Y4.125
N50 X0.125
N55 Y0.125
• Second pass:
conventional mill to a
depth of 0.25 around
edge profile.
N35 Z-0.250
N40 X3.875
N45 Y4.125
N50 X0.125
N55 Y0.125
N60 Z0.125
• Third pass: conventional
mill to a depth of 0.125
around pocket profile.
N100 Y2.125
N105 X2.625
N110 Z0.125
N115 G00 X-5 Y-5 Z5
N120 M05
N125 M30
Advanced features:
Program structure
Every program consists of:
1. Program Start
The program start is the program number. The program number begins
with character/letter O.
2. Program Contents
NC blocks
3. Program End
M30 for a main program
M17 for a sub-program
Program Numbers
O6999
.
.
.
O0256
O0255
.
.
.
O0000
• N is the address
• Block numbers from N0000 to
• N9999
• A block consists of number and words
• Words are contents of a block
• Block numbers are selected in the jumps of
ten for the purpose of insertion
• The maximum block length must not exceeded four lines. If max. length exceeded
alarm 650 occurs.
• Every block starts with a block number.
• After the block numbers follows the G command.
• Words consists of coordinates X(U), Z(W).
• For G02, G03 program interpolation parameter I and K are placed after X(U),
Z(W).
• The F word (feed, thread pitch).
• The S word (cutting speed).
• The T word (tool address).
• The M word (additional functions).
Example:
P0 N… …
P0 P1 N… G01 X40. Z25. F…
P1 P2 N… G01 X60. Z-40. F…
P2 N… …
Absolute coordinate
system
Example:
P0 N… …
P0 P1 N… G01 U5. W-25. F…
P1 P2 N… G01 X10. Z-15. F…
P2 N… …
Incremental coordinate
system
P0 N… …
P0 P1 N… G01 U5. W-25. F…
P1 P2 N… G01 X60. Z-15. F…
P2 N… …
Mixed coordinate
system
G90:
G01 X… Z…
N030 G00 X39 Z2
N040 G01 X39 Z0
N050 G90
N060 G01 X48 Z-37
G91:
N030 G00 X39 Z2
N040 G01 X39 Z0
N050 G91
N060 G01 X4.5 Z-37
G90
G01 X+140 Z-90
Target point abs.
G91
G01 X+40 Z-60
Target point incr.