Home › G-codes › Mach3 Mach4 › G68
G68 Rotate coordinates
Mach3 Mach4 G-code · Mill
Rotates the program about a center point in the XY plane. Positive R is counterclockwise. The center letters differ between Mach3 and Mach4.
Format
G68 X Y R (Mach4) or G68 A B R [I] (Mach3)
Addresses
| Address | What it does |
|---|---|
X Y | Mach4 center of rotation |
A B | Mach3 center of rotation, A is X and B is Y |
R | Rotation angle in degrees |
I | Mach3, any I adds R to the rotation already active |
How it works
Modal, rotation group. Cancel with G69.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
S6000 M3 (SPINDLE ON)
G43 H1 Z1.0 (LENGTH OFFSET)
…
T1 M6 (TOOL CHANGE)
S6000 M3 (SPINDLE ON)
G43 H1 Z1.0 (LENGTH OFFSET)
…
The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Mach3 uses A and B for the center. A Fanuc or Mach4 G68 X Y line on Mach3 rotates about the wrong point, and A may move a rotary.
- XY plane only.
- Pair it with a probe to square up a skewed part.
Related codes
G68 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Coordinate system rotation |
| Haas NGC | Coordinate rotation |
| Mazak (EIA) | Coordinate rotation |
| Mitsubishi M70 M80 | Coordinate rotation |
| Brother Speedio | Coordinate rotation |
| Fagor 8055 8065 | Stock removal along X (lathe) |
| Centroid CNC12 Acorn | Coordinate rotation on |
| Hurco WinMax (NC) | Coordinate rotation |
| Fadal | Coordinate rotation |
| Swiss (Citizen Star) | Balance cut or double turret mirror on (Star) |
Every G-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G68 in the app All Mach3 Mach4 G-codes