Home › G-codes › Mach3 Mach4 › G52
G52 Local coordinate shift
Mach3 Mach4 G-code · Mill
Shifts all work coordinates by the given amounts without motion. Good for repeating a feature at another spot.
Format
G52 [X] [Y] [Z] [A]
Addresses
| Address | What it does |
|---|---|
X Y Z A | Shift amount for each axis |
How it works
Modal until G52 X0 Y0 Z0 or reset.
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 9-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- G52 shifts every fixture offset, not only the active one.
- Mach3 G52 and G92 share the same mechanism. Do not use them together.
- Cancel with G52 X0 Y0 Z0 before the program ends.
Related codes
G52 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Local coordinate system |
| Haas NGC | Set local coordinate system |
| Mitsubishi M70 M80 | Local coordinate system |
| Brother Speedio | Local coordinate system |
| LinuxCNC Tormach | Local coordinate offset |
| Centroid CNC12 Acorn | Local coordinate shift |
| Hurco WinMax (NC) | Local coordinate system |
| Fadal | Coordinate system shift |
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 G52 in the app All Mach3 Mach4 G-codes