## G12 Circular Pocket Milling CW / G13 Circular Pocket Milling CCW (Group 00)

These two G codes are used to mill circular shapes. They are different only in which direction of rotation is used. Both G codes use the default XY circular plane (G17) and imply the use of G42 (cutter compensation) for G12 and G41 for G13. These two G-codes are non-modal.

*D Tool radius or diameter selection I Radius of first circle (or finish if no K). I value must be greater than Tool Radius, but less than K value. K Radius of finished circle (if specified) L Loop count for repeating deeper cuts Q Radius increment, or stepover (must be used with K) F Feedrate in inches (mm) per minute Z Depth of cut or increment

*In order to get the programmed circle diameter, the control uses the selected D code tool size. To program tool centerline select D0.

The tool must be positioned at the center of the circle using X and Y. To remove all the material within the circle, use I and Q values less than the tool diameter and a K value equal to the circle radius. To cut a circle radius only, use an I value set to the radius and no K or Q value.

% O00098 (SAMPLE G12 AND G13) (OFFSET D01 SET TO APPROX. TOOL SIZE) (TOOL MUST BE MORE THAN Q IN DIAM.) T1M06 G54G00G90X0Y0 (Move to center of G54) G43Z0.1H01 S2000M03 G12I1.5F10.Z-1.2D01 (Finish pocket clockwise) G00Z0.1 G55X0Y0 (Move to center of G55) G12I0.3K1.5Q0.3F10.Z-1.2D01 (Rough and finish clockwise) G00Z0.1 G56X0Y0 (Move to center of G56) G13I1.5F10.Z-1.2D01 (Finish pocket counterclockwise) G00Z0.1 G57X0Y0 (Move to center of G57) G13I0.3K1.5Q0.3F10.Z-1.2D01 (Rough and finish counterclockwise) G00Z0.1 G28 M30

These G codes assume the use of cutter compensation, so a G41 or G42 is not required in the program line. However, a D offset number, for cutter radius or diameter, is required to adjust the circle diameter. The following programming examples show the G12 and G13 format, as well as the different ways these programs can be written.

Single Pass: Use I only.

Applications: One-pass counter boring; rough and finish pocketing of smaller holes, ID cutting of O-ring grooves.

Multiple Pass: Use I, K, and Q.

Applications: Multiple-pass counter boring; rough and finish pocketing of large holes with cutter overlap.

Multiple Z-Depth Pass: Using I only, or I, K, and Q (G91 and L may also be used).

Applications: Deep rough and finish pocketing.

The previous figures show the tool path during the pocket milling G-codes.

**Example** G13 multiple-pass using I, K, Q, L, and G91:

This program uses G91 and an L count of 4, so this cycle will execute a total of four times. The Z depth increment is 0.500. This is multiplied by the L count, making the total depth of this hole 2.000.

The G91 and L count can also be used in a G13 “I only” line.

Program Example Description % O4000 (0.500 entered in the Radius/Diameter offset column) T1 M06 (Tool #1 is a 0.500” diameter endmill) G00 G90 G54 X0 Y0 S4000 M03 G43 H01 Z.1 M08 G01 Z0 F30. G13 G91 Z-.5 I.400 K2.0 Q.400 L4 D01 F20. G00 G90 Z1.0 M09 G28 G91 Y0 Z0 M30 %

__G12 Circular Pocket Milling CW / G13 Circular Pocket Milling CCW__