G52: Local coordinate system
What G52 does
G52 moves the program zero by the given amounts relative to the active work offset, so the same pattern can be cut at several places. G52 X0 Y0 removes the shift. Forgetting to remove it leaves every later program shifted.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Non-modal |
| Modal | No: acts only on its own line |
G52 example
G52 X100. Y0. Zero moves 100 mm in X inside G54.
| Word | What it means here |
|---|---|
G52 | Local coordinate system |
X100. | X axis target (on a lathe, the diameter) |
Y0. | Y axis target |
Codes people confuse with G52
| Code | What it does instead |
|---|---|
G92 | Set coordinate system (shift). Tells the control that the current position has the given coordinates. |
G54 | Work offset 1. Selects the first work coordinate system, where program zero is on the part. |
Other codes in the non-modal group
These also act only on their own line.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G52
-
What does
G52do? (Mill and lathe) -
Which code: Shifts the zero point temporarily inside the active work offset.(Mill and lathe)
-
What does
G92do? (Mill)
Show the answers
- Shifts the zero point temporarily inside the active work offset.
- G52
- Tells the control that the current position has the given coordinates.
Frequently asked questions
- What does G52 mean in CNC programming?
- Local coordinate system. Shifts the zero point temporarily inside the active work offset.
- Is G52 modal?
- No. G52 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
- What is the difference between G52 and G92?
- G52 (local coordinate system): shifts the zero point temporarily inside the active work offset. G92 (set coordinate system (shift)): tells the control that the current position has the given coordinates.
- What is the difference between G52 and G54?
- G52 (local coordinate system): shifts the zero point temporarily inside the active work offset. G54 (work offset 1): selects the first work coordinate system, where program zero is on the part.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.