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.
| Property | Value |
|---|---|
| Code | G68 |
| Function | Coordinate System Rotation |
| Modal group | 16 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G68 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
G68 X_ Y_ R_| Address | Meaning |
|---|---|
X Y | Rotation centre |
R | Angle in degrees (+ = CCW) |
G68 example program
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.