CNC mill · G-code

G68 / G69: coordinate system rotation

G68 rotates the moves that follow by an angle R about a centre point, so a square program cuts at an angle. G69 cancels it. Positive R is counterclockwise; a pattern can repeat around a centre. Haas lists it in modal group 16. Formats below from Haas, Mach4, Mach3 and Fanuc, each from its maker. LinuxCNC has no such code.

Worked example

Cut a 1" line at 45° by rotating a square program. Written for this page in the Haas format.

G00 G90 G54 X0 Y0 Z0.1G68 X0 Y0 R45. (rotate 45° CCW about X0 Y0)G01 Z-0.05 F10.X1. F20. (ends at X.7071 Y.7071 in G54)G00 Z0.1G69 (rotation off)
The worked example’s toolpath, from the front (X, Z): feed moves solid, rapid moves dashed, from the start point.rapidfeedstart pointXZ
The worked example’s toolpath. Drawn to the example’s own coordinates.

Rotating X1 Y0 by 45° about X0 Y0 lands at X0.7071 Y0.7071.

How each control writes it

Haas G17 G68 X- Y- R- (G69 cancels)

One source: Haas Automation, the control's maker

X, Y
Centre of rotation in the plane; the current position if left out (optional)
R
Angle, degrees, −360.000 to 360.000, positive counterclockwise; Setting 72 if left out (optional)
  • Needs Haas's Rotation and Scaling option.
  • Values on the G68 line itself are not rotated.
  • In G91 with Setting 73 on, each G68 adds R to the angle.
  • Turn cutter comp on after G68 and off before G69. With scaling, scaling goes on first, in its own block.

Source: Haas Automation, mill G68

Mach4 G68 X- Y- R- (G69 cancels)

One source: Artsoft (Newfangled Solutions), the control's maker

X, Y
Point the program rotates about (optional)
R
Angle; positive is counterclockwise looking from +Z
  • XY plane (G17) only, and modal.
  • After G68 X0 Y0 R45, a move to X1. ends at X.7071 Y.7071.

Source: Mach4 Mill Programming Guide v1.1 (Artsoft), "G68 Coordinate System Rotation" (archived Jul 1, 2024)

Mach3 G68 A- B- I- R- (G69 cancels)

One source: Artsoft (Newfangled Solutions), the control's maker

A
X coordinate of the centre
B
Y coordinate of the centre
R
Angle, degrees, positive counterclockwise from +Z
I
If present (its value is ignored), R is added to the rotation already set (optional)
  • A and B, not X and Y, give the centre on Mach3.

Source: Using Mach3Mill rev 1.84 (Artsoft), "10.7.20 Rotate coordinate system - G68 and G69" (archived Oct 18, 2026)

Fanuc G17 (G18, G19) G68 α_ β_ R_ ; … G69 ;

One source: FANUC, the control's maker

α_ β_
Centre of rotation: the plane’s two axes, absolute
R
Angle, counterclockwise positive (least increment 0.001°)
  • FANUC 0i-MF (machining centre), from its operator’s manual. On another FANUC model, check that control’s manual.
  • Parameter No. 5400 bit 0 (RIN) sets whether R is always absolute or follows G90/G91.

Source: FANUC B-64604EN-2/01, Operator's Manual, 0i-MF (machining centre), §6.12

Controls without it

  • LinuxCNC: LinuxCNC has no G68. It rotates a work coordinate system instead: G10 L2 P1 R30 turns G54 30° counterclockwise about its origin. Source (archived Oct 29, 2026)

How the controls differ

  • Only Mach3 takes A, B, I.
  • Only Fanuc takes α_ β_.
  • A word two controls share can still mean different things: read each control's list above.

Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.