G-code reference
G12 G-Code: Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1)
Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1) — On Haas mills, G12 mills a circular pocket clockwise (G13 counter-clockwise) in one line, with optional stepping out and multiple depths. On Fanuc lathes…
| Property | Value |
|---|---|
| Code | G12 |
| Function | Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Milling machines |
| Syntax | Haas: G12 I_ K_ Q_ D_ L_ Z_ F_ |
What does G12 do?
On Haas mills, G12 mills a circular pocket clockwise (G13 counter-clockwise) in one line, with optional stepping out and multiple depths. On Fanuc lathes, G12.1 starts polar coordinate interpolation for milling flats with live tools.
G12 is a one-shot code: it only acts in the block where it is written, and the previously active modal codes take over again afterwards.
Syntax and parameters
Haas: G12 I_ K_ Q_ D_ L_ Z_ F_| Address | Meaning |
|---|---|
I | Radius of first circle |
K | Radius of finished circle |
Q | Radial step-over |
D | Cutter comp offset number |
L | Loop count for depth |
Z | Depth of cut |
G12 example program
(Haas: 50 mm pocket, 10 mm cutter)
G00 X0 Y0 Z1.0
G12 I5.0 K25.0 Q4.0 D01 Z-3.0 F300.▶ Open this example in the G-code viewer
Tips and common mistakes
- Not available on standard Fanuc mills — use a G02/G03 or macro instead.
- Lathe G12.1 must be cancelled with G13.1.
Controller compatibility
G12 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G13 — Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1)
- G02 — Circular Interpolation Clockwise
- G41 — Cutter Radius Compensation Left