G52 Local coordinate system
Fanuc G-code · Mill, Lathe
On mills: Local coordinate system
Shifts the zero point inside the active work offset by the given amount. Handy for repeating features or a pattern at several spots. All work offsets shift together.
Format
Addresses
| Address | What it does |
|---|---|
X Y Z | Shift from the work zero. G52 X0 Y0 Z0 cancels |
How it works
Stays active until cancelled, but the block itself is group 00.
Example program
M98 P1300 (CUT POCKET)
G52 X3. Y0. (SHIFT ZERO 3 INCH IN X)
M98 P1300 (SAME POCKET AT NEW ZERO)
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Always cancel with G52 X0. Y0. Z0. A forgotten shift moves the next program too.
- Reset or M30 may or may not cancel it, depending on a parameter.
- G92 and G52 together are confusing. Use one or the other.
On lathes: Local coordinate system
Shifts the zero point inside the current work coordinate system. Handy for repeating features at a new spot. G52 X0 Z0 cancels it.
Format
Addresses
| Address | What it does |
|---|---|
X Z | Shift from the work zero to the local zero |
How it works
Stays until G52 X0 Z0, a reset or a new work offset, depending on parameters.
Example program
M98 P2000 (RUN FEATURE SUBPROGRAM)
G52 Z0 (CANCEL SHIFT)
Example is in inch. Check offsets and clearances first.
Watch out for
- Always cancel with G52 X0 Z0 before the next tool or part.
- Check how X is read on your machine, diameter or radius, before using an X shift.
Related codes
G52 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Set local coordinate system |
| Mitsubishi M70 M80 | Local coordinate system |
| Brother Speedio | Local coordinate system |
| LinuxCNC Tormach | Local coordinate offset |
| Mach3 Mach4 | Local coordinate shift |
| Centroid CNC12 Acorn | Local coordinate shift |
| Hurco WinMax (NC) | Local coordinate system |
| Fadal | Coordinate system shift |
Every G-code for Fanuc 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 Fanuc G-codes