G12 Circular Pocket Milling CW / G13 Circular Pocket Millin...

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

These G-codes mill circular shapes. They are different only in that G12 uses a clockwise direction and G13 uses a counterclockwise direction. Both G-codes use the default XY circular plane (G17) and imply the use of G42 (cutter compensation) for G12 and G41 for G13. G12 and G13 are non-modal.

* D - Tool radius or diameter selection** F - Feedrate 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) Z - Depth of cut or increment

*indicates optional

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

NOTE Specify D00 if you do not want to use cutter compensation. If you do not specify a D value in the G12 / G13 block, the control uses the last commanded D value, even if it was previously canceled with a G40 .

Rapid-position the tool to the center of the circle. To remove all the material inside 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.

% O60121(SAMPLE G12 AND G13) ; (G54 X0 Y0 is center of first pocket) ; (Z0 is on top of the part) ; (T1 is a .25 in. dia endmill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X0 Y0 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Tool offset 1 on) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G12 I0.75 F10. Z-1.2 D01 (Finish pocket CW) ; G00 Z0.1 (Retract) ; X5.(Move to center of next pocket) ; G12 I0.3 K1.5 Q1. F10. Z-1.2 D01 ; (Rough & finish CW) ; G00 Z0.1 (Retract) ; X10.(Move to center of next pocket) ; G13 I1.5 F10. Z-1.2 D01 (Finish CCW) ; G00 Z0.1 (Retract) ; X15. (Move to center of the last pocket) ; G13 I0.3 K1.5 Q0.3 F10. Z-1.2 D01 ; (Rough & finish CCW) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; % Circular Pocket Milling, G12 Clockwise shown: [1] I only, [2] I, K and Q only.

These G codes assume cutter compensation, so you do not need to program G41 or G42 in the program block. However, you must include a D offset number, for cutter radius or diameter, to adjust the circle diameter.

These program examples show the G12 and G13 format, and the different ways that you can write these programs.

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 G13I only line.

% O60131 (G13 G91 CCW EXAMPLE) ; (G54 X0 Y0 is center of 1st pocket) ; (Z0 is on top of the part) ; (T1 is a 0.5 in. dia endmill) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X0 Y0 (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G13 G91 Z-.5 I.400 K2.0 Q.400 L4 D01 F20. ; (Rough & finish CCW) ; (BEGIN COMPLETION BLOCKS) ; G00 G90 Z0.1 M09 (Rapid retract, coolant off) ; G53 G49 Z0 M05 (Z home, spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

Từ khóa » G12 G13 Cnc