CNC Part Programming
CNC Part Programming
simulation software.
Block Format:
1. Fixed sequential format
2. Tab sequential format
3. Word address format
Assume that a drilling operation is to be
programmed as:
B C
2 0
1 5
1 0 P o s i t i o n i n g m o t i o n f r o m A t o C
N 1 0 G 0 0 X 3 0 0 0 0 Y 2 0 0 0 0 F 0
A
5
5 1 0 1 5 2 0 2 5 3 0
G01 Linear Interpolation
Z
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.
The G02 command
requires an endpoint
and a radius in order
to cut the arc.
I,J, and K are relative to
the start point.
N_ G02 X2 Y1 I0 J-1
F10
or
N_ G02 X2 Y1 R1
C i r c u l a r i n t e r p o l a t i o n f r o m A t o B
a b o u t a c i r c l e c e n t e r e d a t C
N 1 0 G 0 2 X 2 0 0 0 0 Y 1 0 0 0 0
2 5 I 5 0 0 0 J 1 5 0 0 0 F 2 5 0 0
I = 5 A C
2 0
1 5
J = 1 5
1 0 B
C
5
5 1 0 1 5 2 0 2 5 3 0
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:
O6999
.
.
.
O0256
O0255
.
.
.
O0000
P0 N… …
P0 P1 N… G01 X40. Z25. F…
P1 P2 N… G01 X60. Z-40. F…
P2 N… …
Absolute coordinate
system
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
G91
G01 X+40 Z-60
Target point incr.
For more
CNC Prg. Basics detail contact us 61