L06 Part Programming 2
L06 Part Programming 2
Note:(1) Be careful not to run into the machine table, fixture, part, etc.
(2) Xn Yn Zn specify the coordinates of the cutter center at the tip.
Linear Interpolation
Linear Interpolation command G01 – for cutting.
It moves the tool along a straight-line path from the initial (current) position
to the final position at a programmed feedrate.
General Syntax: G01 Xn Yn Zn Fn
Note:(1) The cutter must be tangent to the line it cuts (calculating cutter
offset is needed).
(2) Xn Yn Zn specify the coordinates of the cutter center at the tip.
CNC – Computer Numerical Control
Linear Interpolation
Machine a rectangular block 3” 2” 0.5”. Cutter ½” end mill.
Part zero: X 0 & Y 0 at lower left-hand corner. Z 0 at top of the
part.
Z Y
Linear InterpolationX=M.HOME
Y=M.HOME X
Ex: Machine a rectangular block 3” 2” 0.5”. X0 & Y0 at lower
Z=M.HOME left-
X=-0.5
hand corner. Z0 at top of the part. Cutter ½” end mill. Blank in irregular
Y=-0.25
shape. Assume part origin is set earlierX=-0.5
Z=1.0
Y=-0.25
Y=-0.5 X=-0.25 X=3.25
O0001 Y=2.25 Y=2.25
Z=.25
Z=M.HOME
N0010 G20 G90 Z=-0.55 Z=-0.55
X=-0.5
N0020 G92 X-10.2 Y11.6 Z7.6 (not using tool length offset)X=3.25
X=-0.5
X=-0.25
Y=-0.5
N0030 T01 M06 X=-0.5
Y=-0.25
Y=-0.25
Z=.25 Y=-0.25
Y=-0.5
Z=-0.55
Z=-0.55 Z=-0.55
N0040 M03 S800 Z=-0.55
N0050 G00 X-.5 Y-.5 Z=7.6
N0060 G00 Z.25 Y=11.6 Z Y
N0070 G01 Z-.55 F5.0
N0080 G01 X-.25 Y-.25 X=-10.2 X
N0090 Y2.25
N0140 G00 Z1.0
N0100 X3.25 N0150 M05
N0110 Y-.25 N0160 G28
N0120 X-.5 N0170 M30
N0130 Z.25
Circular Interpolation
Circular Interpolation commands G02 & G03 – for cutting a circular contour.
It moves the tool along a circular path from the initial (current) position to the
final position at a programmed feedrate.
Note:(1) Circular interpolation is executed on a plane. Plane selection
(modal commands): G17 – XY (default), G18 – XZ, G19 – YZ.
(2) Tool motion direction: G02 – clockwise; G03 – counterclockwise.
(3) Absolute or Incremental coordinates are being used.
General Syntax: G02 (G03) Xn Yn (Zn) In Jn (Kn) (Fn)
Circular Interpolation
Example:
N010 G90 (Absolute) Initial position of ½” tool
N020 G17 (XY Plane) Y
N040 G01 X3.0 Y.25 F10.0
X
N040 G02 X4.125 Y-3.9486 I0. J-2.25 J
2
R2
Calculation: Y
60
End Position: This is absolute positioning
X=3+2.25cos(60)
Y=-2-2.25sin(60) 3
I and J: (center-initial)
X
I=3-3
End
J=-2-0.25
position
This is incremental positioning with respect to initial position of
Circular interpolation.
Circular Interpolation
Circular Interpolation via Radius Specification – coding the radius (R) of the
circular arc instead of I, J, and K.
General Syntax: G02 (G03) Xn Yn (Zn) Rn (Fn)
Questions:
What happens if an R word and a set of I and J words (for the XY plane) are
both given in the same circular interpolation command block?
Can R word be used to machine full circles?
Cutter radius compensation
Source: https://www.youtube.com/watch?v=vFD7uTQEel0
DEF WORK
PS LC, [0,0], [200,40]
END
DRAW ---------------- ROUGH CUT --------------------
G00 X500 Z500
G50 S2500 NT1 G96 S130
G85 NLAP1 D10 F0.3 U1.0 W0.1
NLAP1 G81 G00 X42 Z65
G00 G42 X26 Z201 G97 X500 Z250 S930
G01 X34 Z196 F0.15 M01
Z167 X42 Z205 T020202
G03 X34 Z127 L80
G01 Z87 ---------------- FINISH CUT -------------------
X40 Z84
Z60 NT2 G96 S180
G02 X40 Z20 L60 G87 NLAP1
G01 X42 G00 X500 Z250 M05 M09
G40 M02
G80
G00 X42 Z205 S670 T010101 M03 M08
Cutter radius compensation
Source: https://www.youtube.com/watch?v=vFD7uTQEel0
Z0
X0
Tool length offset / compensation
Tool length compensation / offset cutter
G43 tool length compensation (positive direction)
workpiece
G44 tool length compensation (negative direction)
G49 cancel Tool nose radius compensation spindle
Z0
Objective is to touch the tool tip to
the upper surface of the workpiece
X0
Milling Program Assignment- Group 1
Milling Program Assignment- Group 2
Milling Program Assignment- Group 3
Milling Program Assignment- Group 4
Milling Program Assignment- Group 5
Milling Program Assignment- Group 6
G Code list
G Code list (Cont.)
M Code list (Cont.)
88 96
80
70
60
35 G00
25
R40
G01
20 G02
R5
G03
Feed G40
G42
R5
0.15
80
90
80
60
200
196
167
127
87
84
60
R60
20
X
R 80
z
28
40
34
Feed
0.15