G12.1–G13.1

Machining center, LatheModal

Polar coordinate interpolation (ON with G12.1, OFF with G13.1)

Format and notes

G12.1 ; (on a line of its own. The C position at this moment becomes 0°)
G01 G42 X_ C_ F_ ; (C is written as a length, as a virtual Y axis)
…
G40 … ;
G13.1 ; (on a line of its own)

Diagram: polar coordinate interpolation: programming the end face in X–Y coordinates

C (spindle rotation)Live toolEnd face, seen head-onX (linear axis)Virtual YC(no real axis)While G12.1 is on, program the end face in X–Y coordinates
The lathe's C axis (spindle rotation) and X axis (linear) move together so a live tool can mill a hexagon or similar on the end face. While G12.1 is on, you program in X and Y as if there were a virtual Y axis on the end face, and the CNC converts this into the C angle and the combined feed.

Differences between controls and machines

The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.

SourceMachineItemDetail
Siemens (ISO dialect)LatheGroup21. Equivalent to TRANSMIT among Siemens functionsThe note in ISO Turning 2007 mixes up TRANSMIT and TRACYL (the correspondence in ISO Milling 2007 is correct)
Mitsubishi ElectricLatheCodeG12.1/G13.1 or G112/G113 in G-code lists 6 and 7 (both group 19)
Mitsubishi ElectricLatheMeaningIn G-code lists 2–5, G12.1/G13.1 is “milling interpolation” (a different function)
HaasLatheCodeG112 (XY to XC interpolation, group 04). Cancel with G113
HaasMachining centerMeaningOn machining centers, G12 and G13 are circular pocket milling, and G112 and G113 are work coordinate systems #9 and #10 (not polar coordinate interpolation)
Siemens (native)LatheFormatON with TRANSMIT, OFF with TRAFOOF
LinuxCNC—AvailabilityThere is no code equivalent to polar coordinate interpolation

Sources

The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.

  1. Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
  2. Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com
  3. Mitsubishi Electric — MITSUBISHI CNC 700/70 Series Programming Manual (Lathe System) (IB-1500057) mitsubishielectric.com
  4. Haas Automation, Inc. — G112 XY to XC Interpolation (Group 04) (lathe, per-code explanation page) haascnc.com
  5. Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com
  6. Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
  7. Siemens AG — SINUMERIK 840D sl/840D/840Di sl/810D Fundamentals, Programming Manual, Edition 08/2005 (6FC5398-1BP10-0BA0) cache.industry.siemens.com
  8. LinuxCNC project — G-Codes (LinuxCNC Documentation) linuxcnc.org
  9. Hitachi Seiki (inventor: Toru Ogawa) — Interpolation method for linear and rotary axes of a numerical control device (Japanese Unexamined Patent Publication H4-322301, Japanese Patent No. 2566180) patents.google.com