Home › G-codes › LinuxCNC Tormach › G52
G52 Local coordinate offset
LinuxCNC Tormach G-code · Mill and lathe
Shifts the current work offset by the given amounts for repeated features. G52 with zero values cancels it.
Format
G52 [X] [Y] [Z] [A] [B] [C]
Addresses
| Address | What it does |
|---|---|
X Y Z | Shift from the active work origin |
How it works
Modal. Stays on until G52 with zeros, G92.1 or a program end.
Example program
G20 G17 G40 G49 G54 G80 G90 G94 (INCH, SAFE START)
T1 M6 G43
S3000 M3
G52 X3 Y0 (SHIFT TO SECOND PART)
…
T1 M6 G43
S3000 M3
G52 X3 Y0 (SHIFT TO SECOND PART)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- In LinuxCNC G52 and G92 share the same offset parameters 5211 to 5219. Using both mixes them.
- Cancel with G52 X0 Y0 Z0 before the next part.
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 |
| 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 LinuxCNC Tormach 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 LinuxCNC Tormach G-codes