CNC Datums and Work Offsets — G54, G55, G56, G57 Explained

A CNC machine has a fixed reference point called machine zero — a physical location the machine establishes at startup. Your part, however, sits on the table at an arbitrary position determined by how it was fixtured. Work offsets bridge that gap: they tell the controller where your part zero is relative to machine zero, so your program coordinates match the actual part geometry.

G54 through G59 are the six standard work offset registers. Each stores an XYZ offset from machine zero to a part datum.

Why Work Offsets Exist

Without work offsets, every program would need to be written in machine coordinates — meaning coordinates measured from the machine's home position. Since the part is fixtured differently every time, the program would need to be rewritten for each setup.

Work offsets separate the program from the setup. The program always refers to G54 (or whichever offset is active). When the part is re-fixtured, only the offset value changes — not the program.

G54 Through G59 — The Six Standard Offsets

G54    (work offset 1 — most commonly used)
G55    (work offset 2)
G56    (work offset 3)
G57    (work offset 4)
G58    (work offset 5)
G59    (work offset 6)

Each register holds an X, Y, Z value (and sometimes A, B, C for rotary axes) that defines the distance from machine zero to the part datum.

Activating an offset is a single word on any block:

G0 G54 X0. Y0.    (move to part zero using offset 1)

Once active, G54 remains in effect until another offset is called or G53 overrides it.

Setting a Work Offset

Work offsets are set at the machine control, not in the program. The process:

  1. Load the part and fixture it
  2. Use an edge finder, probe, or tool to locate the part datum (typically a corner, centerline, or reference feature)
  3. Enter the machine position at that point into the G54 register (X, Y, Z separately)

On Fanuc controls, offsets are stored under OFFSET → WORK. On Haas, they appear in the Work Zero Offset page.

Some machines support setting offsets via G10 in the program:

G10 L2 P1 X-250.5 Y-175.3 Z-100.0    (set G54 offset via program)

L2 = work offset, P1 = G54 (P2 = G55, etc.).

Using Multiple Offsets in One Program

Multiple offsets are useful when a fixture holds several identical parts simultaneously. Each part gets its own offset; the program runs the same toolpath in each offset in sequence.

T1 M6
G43 H1 Z100.
S5000 M3
M8

G54                    (part 1)
M98 P5000              (run machining subprogram)

G55                    (part 2)
M98 P5000

G56                    (part 3)
M98 P5000

G0 Z100.
M9 M5
G28 G91 Z0.
M30

The subprogram O5000 contains the actual machining code, written relative to part zero. It runs identically in each offset — no changes needed.

Extended Work Offsets

Six offsets are often not enough for complex fixtures or multi-pallet systems. Most modern controllers support extended offsets:

  • Fanuc: G54.1 P1 through G54.1 P48 (48 additional offsets)
  • Haas: G110 through G129 (additional offsets)
  • Siemens: Settable frames (unlimited, parameter-dependent)
G54.1 P10    (Fanuc extended offset 10)

G53 — Machine Coordinate Override

G53 temporarily suspends the active work offset and moves to machine coordinates. It is non-modal — it only applies to the block it appears in.

G53 G0 Z0.    (move to machine Z zero — tool change position)

G53 is commonly used for tool changes on machines where the tool changer requires a specific machine coordinate position.

Common Mistakes

Wrong offset active — running a program in G54 when the part is fixtured for G55 sends the tool to the wrong location. Always verify the active offset before Cycle Start.

Z offset set incorrectly — the Z offset determines the part surface height. If Z is off by even 1mm, every depth in the program is wrong. Use a reference tool or probe to set Z precisely.

Forgetting to call an offset — if no work offset is active, the machine runs in G53 (machine coordinates). The first positioning move goes to an unexpected machine location, usually causing an over-travel alarm or crash.

Verify Work Offsets in Simulation

Eureka3X lets you define the work offset position relative to the machine model before running the simulation — so you can verify that the program coordinates place the tool correctly on the part, not in the fixture or table.

Try Eureka3X free for 30 days →

Related Articles

Start verifying your real G-code today.

Ensure your programs are safe and accurate with Eureka 3X Pro.

Start 30-Day Free Trial