Printed from Kezuriba (kezuriba.net/en/nc/g68/)
G68
Machining center, LatheModal, group 16Coordinate rotation
On machining centers
G17 G68 X_ Y_ (rotation center) R_ (angle)
- Often an optional feature
- R is positive counterclockwise (Haas). If the rotation center is omitted, the current position is the center (Haas)
- Apply cutter compensation after the rotation, and cancel it before cancelling the rotation (Haas)
- When combined with scaling, enter G51 then G68 in separate blocks in that order, and cancel in the order G69 then G50 (Haas)
- Creating a coordinate system on a three-dimensional tilted plane is G68.2 (tilted working plane command), a different function. The numbers are similar, so don't confuse them
Diagram: Coordinate rotation: center and angle
On lathes: Differs by machine (mirror of the opposed tool post, or coordinate rotation)One source / reference
The same number means something different on lathes (FANUC-type G-code system A).
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.
| Source | Machine | Item | Detail |
|---|---|---|---|
| Siemens (ISO dialect) | Lathe | Meaning | Opposed turret (dual turret) mirror ON (group 4)In the Siemens ISO T table, G68/G69 are dual turret ON/OFF |
| Haas | Lathe | Meaning | Coordinate rotation (group 16) |
Frequently asked questions about G68
- What is G68 (Coordinate rotation) used for and how is it formatted in a CNC program?
- G68 commands "Coordinate rotation" on Machining center, Lathe. The standard program format is "G17 G68 X_ Y_ (rotation center) R_ (angle)". Often an optional feature
- Is G68 a modal code or a one-shot (non-modal) code?
- G68 is a modal code (Group 16). Once commanded, it remains active across subsequent blocks until another code from the same modal group overrides it or the control is reset. Always state or cancel modal states explicitly in your safety block and at the end of a tool operation so residual modes do not cause unexpected motion when restarting mid-program.
- Does G68 work differently on machining centers (mills) versus CNC lathes?
- Yes. On a machining center G68 means "Coordinate rotation", whereas on a CNC lathe (FANUC G-code System A) G68 means "Differs by machine (mirror of the opposed tool post, or coordinate rotation)". Never copy G68 between mill and lathe programs without checking which G-code system (A, B, or C) your lathe uses.
- Are there differences in G68 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- Yes. Control builders such as FANUC, Mitsubishi Electric (M80/M800), Okuma (OSP), Haas, Mazak, Siemens (SINUMERIK ISO dialect), and Heidenhain can differ in argument letters, decimal-point rules, and optional parameters for G68. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- 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
- Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
- Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
- Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com