96-8000 209
G CODES
June 1999
The subroutine must define a closed area by a series of G01, G02, or G03 motions in X and Y and must end
with an M99. G codes G90 and G91 can also be used in the subroutine to select absolute or incremental. Any
codes other than G, I, J, R, X, or Y are ignored in the subroutine. This subroutine must consist of less than 20
strokes.
Pocket milling should begin from a hole which has been previously drilled to the Z depth in order to clear the
tool on entry to the pocket. The G150 block must specify this hole location with X and Y.
The first motion in the subroutine should move from this clear hole to the starting point of the block shape. The
final motion in the subroutine should return to the same point as the starting motion of the subroutine, ie., in
the example on the previous page, the start point of the G150 line is X3.25 Y4.5 and the first move of the sub
is Y7.0. Therefore the end of the sub must return to X3.25 Y7.0.
If a K is specified, the finishing pass is taken along the outside edge but is done at the full pocket depth and
the previous cuts will cut inside the programmed pocket size by K.
O0100 (G150 POCKET EXAMPLE)
G58 G00 G90 X3.25 Y4.5 (STARTING HOLE POSITION)
T1 M06 (T1 CUTS ENTRY FOR END MILL)
G83 R.1 Q0.5 Z-2. F20.
T2 M06 (END MILL T2 CUTS POCKET)
(0.4 DIA CUTTER, TWO PASSES TO Z DEPTH)
(LEAVE 0.1 FOR FINISH PASS)
G150 G41 F15. D02 J0.35 K.01 Q0.5 R.1 X3.25 Y4.5 Z-2. P200
G40 X3.25 Y.45
G28
M30
O0200 (G150 POCKET SUBROUTINE)
G01 Y7.
X1.5
G03 Y5.25 R0.875
G01 Y2.25
G03 Y0.5 R0.875
G01 X5.
G03 Y2.25 R0.875
G01 Y5.25
G03 Y7. R0.875
G01 X3.25
M99 (RETURN FROM SUBROUTINE)