0 votes
in cnc programming by (9.0k points)

In this article, we described how to use G12 and G13 codes for circular pocket cutting in CNC Milling (CNC Machine Centers) machines with all details and examples.

G12 and G13 Codes Introduction

Fanuc controls do not have the very useful G12 and G13 circular pocketing cycle as a standard feature. Controls that do have it, for example Yasnac, have a built-in macro (cycle), ready to be used. Fanuc users can create their own custom macro (as a special G-code cycle), with the optional User Macro (Custom Macro) feature, which can be developed to offer even more flexibility than a built-in cycle.

G12 and G13 Codes Format

The two G-codes are identical in all respects, except the cutting direction. Meaning of the two G-codes in a circular pocket cycle is:

G12 : Circular pocket cutting CW
G13 : Circular pocket cutting CCW

Either cycle is always programmed without cutter radius offset in effect – in G40 cancel mode – and has the following program format:

G12 I.. D.. F.. ; (Conventional Milling)
G13 I.. D.. F.. ; (Climb Milling)


I = Pocket radius
D = Cutter radius offset number
F = Cutting feedrate

Things to Know

Typically, either cycle is called in a program when cutting tool reaches the center and the bottom of a pocket to be machined. All cutting motions are arc motions, and there are three of them. There are no linear motions. The arbitrary start point (and end point) on the pocket diameter will usually be at 0 degree (3 o’clock) – Figure 33-16.

Figure 33-16
Circular pocket cycles G12 and G13

G12 and G13 Codes Examples

Program Example – 1 – G13 Code

If G12 or G13 cycle or a similar macro is available, the following program O3306 can be written, using the same tool and climb milling mode:

N1 G20
N2 G17 G40 G80
N3 G90 G54 G00 X0 Y0 S1200 M03
N4 G43 Z0.1 H01 M08
N5 G01 Z-0.25 F8.0
N6 G13 I0.75 D1 F10.0 (CIRCULAR POCKET)
N7 G28 Z-0.25 M09
N8 G91 G28 X0 Y0 M05
N9 M30

Need to more?

In this article, we described How to use G12 and G13 codes for circular pocket cutting in CNC Milling (CNC Machine Centers) machines with all details and examples. For more details;

For your comments, suggestions and questions, you can write to us from the “Comments Section” below without registration and please consider to share this post!

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.