G-code reference
G54 G-Code: Work Coordinate System 1
Work Coordinate System 1 — Selects work offset 1. It is the most commonly used part zero and is the default on power-up on most controls. G55–G59 select offsets 2–6.
| Property | Value |
|---|---|
| Code | G54 |
| Function | Work Coordinate System 1 |
| Modal group | 14 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Mills and lathes |
| Syntax | G54 (to G59) |
What does G54 do?
Selects work offset 1. It is the most commonly used part zero and is the default on power-up on most controls. G55–G59 select offsets 2–6.
G54 is modal: once programmed it remains in effect for the following blocks until another code from modal group 14 replaces it or the control is reset.
Syntax and parameters
G54 (to G59)G54 example program
G90 G54 G00 X0 Y0
(part 2)
G55 G00 X0 Y0▶ Open this example in the G-code viewer
Tips and common mistakes
- One fixture per offset lets you machine multiple parts in one cycle.
- Set offsets by probing or with G10 L2.
Controller compatibility
G54 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G55 — Work Coordinate System 2
- G54.1 — Additional Work Coordinate Systems
- G10 — Programmable Data Input (Set Offsets)
- G52 — Local Coordinate System