Learn · 6 min

Work offsets explained

A work offset is the machine position of your work zero, so one program runs wherever the part is clamped; G54 to G59 pick six stored offsets.

Work offsets on a mill table, from above: machine zero where the machine homes, and two vises each holding a part. G54 is the machine position of the left part’s work zero, G55 the right part’s, so one program runs on either.machine zeroG54G55partvisetable
Two vises, two work offsets, from above. Not to scale.

Machine zero and work zero

Machine zero is where the machine homes; it never moves. Your program is written from a point on the part, the work zero. A work offset is the machine position of that work zero, so the same program runs wherever the part is clamped.

G54 to G59 pick one of six stored offsets. Each control has more: Haas G154 P1–P99, LinuxCNC G59.1–G59.3, Mach4 G54.1 P1–P248. Two vises, two offsets: G54 for the left part, G55 for the right, and the same program for both.

Finding the edge

An edge finder kicks sideways when its tip is exactly on the edge. At that moment the spindle centre is half the tip’s diameter away: Starrett’s .200" finder leaves the centre .100" short. Moving +X into the edge, add .100 to the reading; moving −X, take it away.

For a bore or a boss, touch both sides and take the midpoint. The finder is short of the edge by the same amount both times, so its size cancels.

For Z, touch the tool on a gauge block or shim of known thickness on top of the part, and take that thickness off the reading.

G10: write it from the program

G10 L2 P1 X- Y- Z- stores the offset in G54 without touching the offsets page: P1 to P6 are G54 to G59. In G90 the value replaces the offset; on Haas and Mach4, in G91 it is added to it, while LinuxCNC ignores G91 here.

L20 is the trap. On LinuxCNC it means “make where I am now read this”. On Haas it writes the G154 and G110 extra offsets, and on Mach4 the G54.1 offsets. Copy an L20 line between controls and it writes a different offset.

Try it on a calculator

  • Work offset calculator — G54–G59 from an edge finder touch, both sides of a bore, or a Z touch-off, and the G10 line that writes it on Haas, LinuxCNC, Mach4 or Mach3.
  • G-code list and checker — Paste a program: missing feeds, spindle off, bad arcs, modal conflicts, plus a code reference.
Check yourself: 5 questions

Check yourself

  1. 1. Moving +X, a .200" edge finder kicks at machine X-10.2345. Where is the edge?

  2. 2. Touching both sides of a bore at X-12.4 and X-10.4: where is its centre?

  3. 3. The tool touches a 1.000" block on the part at machine Z-8.75. Where is the top of the part?

  4. 4. Which P writes G56 with G10 L2?

  5. 5. On which control does G10 L20 mean “make the current position read this value”?

0 of 5 answered