G-code reference

G13 G-Code: Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1)

Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1) — Haas: counter-clockwise version of G12 (climb milling for a right-hand cutter inside a pocket). On Fanuc lathes G13.1 cancels polar coordinate interpolation…

By cnccode · Updated
PropertyValue
CodeG13
FunctionCircular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1)
Modal group00
TypeOne-shot (non-modal) — active only in its own block
Used onMilling machines
SyntaxG13 I_ K_ Q_ D_ L_ Z_ F_

What does G13 do?

Haas: counter-clockwise version of G12 (climb milling for a right-hand cutter inside a pocket). On Fanuc lathes G13.1 cancels polar coordinate interpolation started by G12.1.

G13 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

Format
G13 I_ K_ Q_ D_ L_ Z_ F_
AddressMeaning
I K Q D L Z FSame as G12

G13 example program

Example
G00 X0 Y0 Z1.0
G13 I5.0 K25.0 Q4.0 D01 Z-3.0 F300.

▶ Open this example in the G-code viewer

Tips and common mistakes

  • G13 gives climb milling inside a pocket with a standard right-hand cutter.

Controller compatibility

G13 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.

Frequently asked questions

Is G13 modal?
No. G13 is a one-shot (group 00) code and only acts in the block where it appears.
What does G13 mean in CNC?
G13 means Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1). Haas: counter-clockwise version of G12 (climb milling for a right-hand cutter inside a pocket). On Fanuc lathes G13.1 cancels polar coordinate interpolation started by G12.1.
What is the difference between G13 and G12?
G13 is Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1), while G12 is Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1). See the G12 page for its syntax and examples.
Can I use G13 on a lathe?
Usually not with the same meaning: G13 is documented here for milling machines. Check your control manual for the equivalent.