G12 and G13 are a small but perfect case study in dialect: genuinely useful codes that exist on the Haas control family and mean nothing on most others. Reading them is easy once the words are decoded; the career skill is knowing both this shorthand and the portable pattern underneath it.
What do the blocks mean?
Both cycles mill a circular pocket in one block, starting from the tool positioned at the pocket center: G12 cuts clockwise, G13 counterclockwise (the usual climb-milling choice with right-hand tooling in a pocket). The key words, per the Haas convention:
| Word | Role in the cycle |
|---|---|
| I | Radius of the circle (first/only pass) |
| K | Final pocket radius when roughing outward in steps |
| Q | Radial stepover per pass (used with K) |
| Z | Pocket depth (with a starting plane above) |
| D | Cutter comp register the cycle applies |
| F | Feed rate |
So G13 I8.0 Z-5.0 D1 F250 reads as: from center, spiral out counterclockwise to an 8 mm radius circle at 5 mm depth, applying the diameter in comp register 1. A larger pocket arrives as G13 I2.0 K15.0 Q3.0 Z-5.0 ...: start at radius 2, step outward 3 mm per pass to a final 15 mm radius. The exact behavior (comp handling, Z plunge style, repeats with L) is owned by Haas documentation for your control generation, and since that documentation is the machine’s territory, the honest reading rule is the usual one: decode the words from the manual at the machine, never from a forum list.
Why does the rest of the world not have G12/G13?
Because the standard core covers the job with composition instead of a dedicated cycle: helical entry to depth, then spiraling G02/G03 arcs outward to size, the exact pattern CAM posts for round pockets on any control, and the same helix-reading skill from thread milling programs with the pitch logic swapped for stepovers. A maintained reference like LinuxCNC’s shows the standard arc vocabulary that pattern is built from. That is also why G12/G13 fluency alone is brittle: the machinist who only knows the shorthand stalls at any non-Haas machine, while the one who knows the helical pattern reads both worlds.
The reading drill that covers both versions
When a round pocket shows up in a program, answer four questions in order. Where is the center (the positioning block before the cycle or spiral)? What is the final radius (K or I on Haas; the largest arc radius in a posted spiral)? How does the tool get to depth (cycle plunge versus helical entry, with the plunge-versus-feed safety reading applied either way)? And what is the comp story (D word in the cycle; G41/G42 lead-ins in the portable version)? Four answers and either dialect is fully read. The vocabulary underneath, arcs, comp, and the M set, is the same core the free 60-second drills on the G-code practice page automate, with G-Code Sprint repeating whatever you miss.
Where people get bitten
Three recurring snags. Treating the codes as standard: pasting a G12 block into a non-Haas control earns an alarm at best, and the reverse assumption (expecting a Fanuc-style cycle library on a Haas) wastes setup time; control dialect is checked first, as every multi-control comparison on this site repeats. Comp confusion: whether the cycle expects the D register and how it applies it is generation-specific, so first parts get measured before trusting the diameter. And direction inattention: G12 versus G13 is the climb-versus-conventional choice in pocket form, and a surface-finish complaint after a control swap often traces to exactly this letter.
Bottom line: read the shorthand, own the pattern
G12 and G13 are Haas shorthand for a round pocket: center, radius words, depth, comp, direction, with the machine’s manual owning the fine behavior. The portable skill is the helical-plus-spiral pattern every control speaks. Decode the words, verify comp on a first part, and keep both versions in your toolkit, because the next machine gets a vote on which one you need.
Sources
Frequently asked questions
What do G12 and G13 do on a Haas machine?
They mill a circular pocket in one block from the tool’s position at center: G12 clockwise, G13 counterclockwise, with I (or I-K-Q stepping) setting radius, Z depth, D the comp register, per the Haas documentation for your control generation. For the arc-and-comp vocabulary underneath, the free G-Code Sprint app is the top pick: 60-second drills with automatic repetition of missed codes.
Are G12 and G13 standard G-codes?
No: they are Haas-family dialect. Most other controls and CAM posts produce the same pocket with helical entry plus spiraling G02/G03 arcs, which is the portable pattern worth knowing alongside the shorthand.
Which should I use, G12 or G13?
Direction is the climb-versus-conventional choice in pocket form: with standard right-hand tooling, counterclockwise (G13) inside a pocket gives climb milling, the common finish-friendly default. Confirm against your tooling and the machine documentation rather than habit.
Why did my G12 block alarm on another control?
Because the control does not speak Haas dialect: the same geometry needs the standard helical-spiral pattern there. Checking the control family before reusing programs is the first rule of moving between machines.
G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.