G-code reference

G68 G-Code: Coordinate System Rotation

Coordinate System Rotation — Rotates the programmed coordinate system about a centre point by an angle R. Use it to machine features on a part that is clamped at an angle.

By cnccode · Updated
PropertyValue
CodeG68
FunctionCoordinate System Rotation
Modal group16
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG68 X_ Y_ R_

What does G68 do?

Rotates the programmed coordinate system about a centre point by an angle R. Use it to machine features on a part that is clamped at an angle.

G68 is modal: once programmed it remains in effect for the following blocks until another code from modal group 16 replaces it or the control is reset.

Syntax and parameters

Format
G68 X_ Y_ R_
AddressMeaning
X YRotation centre
RAngle in degrees (+ = CCW)

G68 example program

Example
G68 X0 Y0 R15.0
M98 P1000
G69

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Probe the part angle and feed it into R for automatic alignment.
  • G68.2 is the 5-axis tilted working plane version.

Controller compatibility

G68 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G68 modal?
Yes. G68 belongs to modal group 16 and stays active until another code of that group is programmed.
What does G68 mean in CNC?
G68 means Coordinate System Rotation. Rotates the programmed coordinate system about a centre point by an angle R. Use it to machine features on a part that is clamped at an angle.
What is the difference between G68 and G69?
G68 is Coordinate System Rotation, while G69 is Coordinate Rotation Cancel. See the G69 page for its syntax and examples.
Can I use G68 on a lathe?
Usually not with the same meaning: G68 is documented here for milling machines. Check your control manual for the equivalent.