G68

Machining center, LatheModal, group 16

Coordinate rotation

On machining centers

G17 G68 X_ Y_ (rotation center) R_ (angle)

Diagram: Coordinate rotation: center and angle

R (angle)CCW is +Rotation center(X, Y)Shape before rotationShape rotated by G68G68 X_ Y_ R_Rotates the coordinatesystem R degrees about (X, Y),so later commandscut in the rotated orientation
G68 X_ Y_ R_ rotates the coordinate system by R degrees about (X, Y), and the following commands are cut in the rotated orientation. R is positive counterclockwise. Cancel with G69.

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.

SourceMachineItemDetail
Siemens (ISO dialect)LatheMeaningOpposed turret (dual turret) mirror ON (group 4)In the Siemens ISO T table, G68/G69 are dual turret ON/OFF
HaasLatheMeaningCoordinate 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.

  1. 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
  2. Haas Automation, Inc. — G-code, M-code, and Setting (per-code explanation pages) haascnc.com
  3. Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
  4. Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
  5. Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com