CNC Setup & Machining Guide

How to Set and Adjust CNC Work Offsets

A practical, control-aware guide to G54–G59 work coordinate systems: setting a datum with an edge finder, finding a centre between two edges, establishing Z zero, probing, writing offsets with G10, and verifying the setup safely before the first cut.

G54–G59 work offsets Edge finder & probe methods Z datum setting G10 offset writing FANUC / Haas / Siemens / Heidenhain Verification & troubleshooting
Jump to the Worked Example

Quick answer

A CNC work offset defines the position of the workpiece zero relative to the machine coordinate system. Standard offsets G54 through G59 let an operator establish separate work zeros for individual parts, fixtures or machining stations. Work offsets can be set manually with an edge finder, dial indicator, tool setter or touch probe, or entered programmatically using G10 where the control supports it.

Home / CNC Machining / How to Set CNC Work Offsets

01Key Terms at a Glance

Most work-offset mistakes are not calculation mistakes. They come from mixing up which coordinate system, register or command is actually being used. This table sets the boundaries used throughout the guide.

ItemMeaning
Machine zeroFixed machine reference position established by homing or reference return. It does not move with the part.
Work zero (program zero)The datum selected on the workpiece or fixture that the program is written around.
G54G59Standard selectable work coordinate systems. Each one stores its own X/Y/Z (and additional axes where fitted) offset values.
Tool length offsetCompensates for tool length, typically activated with G43 and an H register. It does not locate the workpiece.
Cutter radius compensationCompensates for cutter radius, typically G41/G42 with a D register.
G52Local coordinate shift applied on top of the active work coordinate system, on controls that support it.
G53Non-modal command that moves in machine coordinates for that block only.
Scope note: this guide focuses on machining-centre (milling) practice. Menu paths, offset signs and G-code syntax vary by machine builder, control model, parameter configuration and shop standard. Always confirm against the manuals supplied with your machine before running anything.

02What Is a CNC Work Offset?

A CNC work offset is the stored distance between machine zero and a selected workpiece datum. It tells the control where the part is sitting inside the machine envelope, so that a program written in part coordinates can be executed on the machine.

Three coordinate systems are active on a typical machining centre at the same time. Keeping them separate in your head is the single most useful habit in setup work.

Machine coordinate system

Established by homing or reference return, this system is fixed to the machine structure. Its zero point is defined by the builder, and on many machining centres it sits at a corner of the travel envelope — which is why typical G54 values are negative. G53 commands motion directly in this system for a single block, which is why it is commonly used for safe retract moves such as G53 G00 Z0.

Work coordinate system

This is where you program. Selecting G54 tells the control to interpret subsequent axis positions relative to the datum stored in the G54 register. Change the stored value and the whole program shifts with it — which is exactly what you want when you reposition a fixture, and exactly what causes trouble when a value is wrong.

Local (temporary) coordinate system

Some controls support a local shift layered on top of the active work coordinate system, commonly through G52. It is convenient for repeated features at a known distance from the main datum, but it is also a frequent source of “the part is offset and I cannot see why” problems, because the shift stays active until it is cleared.

Diagram showing the difference between CNC machine coordinates and G54 work coordinates A machining centre envelope with machine zero at the top right, a workpiece clamped on the table, and the X and Z distances from machine zero to the work zero stored as the G54 offset. Machine travel envelope Machine table Workpiece Spindle Tool tip Machine zero (M) set by homing / reference return Work zero (W) datum chosen on the part G54 X = −250.000 G54 Z = −320.000 +X +Z
Figure 1. Machine coordinates versus G54 work coordinates. The stored offset is the distance from machine zero to the chosen part datum. Values are negative here because machine zero sits at the positive corner of the travel envelope — sign conventions depend on your machine’s axis directions.

03G54–G59 Work Offsets Explained

G54 to G59 are standard commands used to activate different work coordinate systems. Each code recalls a stored set of axis offsets, so the same program can be applied at a different datum simply by changing the active code.

Haas documents G54–G59 as six selectable user work coordinate systems, with further extended offsets available through G154 P1–P99 on those controls. FANUC-style controls provide the same six standard systems, plus additional work coordinate systems (commonly addressed as G54.1 P__) when the option is fitted.

CodeTypical use
G54First workpiece or primary fixture — the default choice for single-part setups
G55Second workpiece or fixture station
G56Third workpiece or station
G57Fourth workpiece or station
G58Fifth workpiece or station
G59Sixth workpiece or station
G54.1 P__ / G154 P__Extended work offsets for tombstones, pallets and high-station-count fixtures — availability and addressing are controller-dependent
Code availability and syntax vary by controller and machine builder. Extended offsets in particular are an option on many machines, not a guaranteed feature. Confirm what your control supports before writing a program around it.
Diagram of G54, G55 and G56 work offsets on a three-station CNC fixture Three identical workpieces on one machine table, each with its own work zero stored in G54, G55 and G56, all measured from a single machine zero. Machine table — one setup, three stations Machine zero Part 1 G54 Part 2 G55 Part 3 G56 One validated subprogram — three independent datums — M98 P1000 called under G54, G55 and G56 Each station stores its own X/Y/Z distance from the same machine zero
Figure 2. Multiple work offsets on a three-station fixture. The toolpath is written once; each station simply activates its own work coordinate system, so a datum error at one station does not propagate to the others.

04Work Offset vs Tool Offset

A tool offset compensates for tool geometry; it does not locate the workpiece. Confusing the two is the most common reason a setup looks correct on the offset page but cuts in the wrong place.
Offset typePurposeTypical codes / register
Work offsetLocates the workpiece datum inside the machine envelopeG54G59, extended offsets
Tool length offsetCompensates for the length of each tool so Z depths are correctG43 H__ (cancel with G49)
Cutter radius compensationOffsets the tool centre from the programmed contour by the cutter radiusG41/G42 with D__ (cancel with G40)
Local coordinate shiftTemporarily shifts the datum within the active work coordinate systemG52
Machine coordinate moveCommands a move in machine coordinates for one block onlyG53

What G41 and G42 actually mean

A widespread shop-floor shortcut says “G41 is climb milling and G42 is conventional milling”. That is not what the codes define, and treating it as a rule will eventually produce a scrapped part.

G41 places the cutter to the left of the programmed contour, and G42 places it to the right, looking along the direction of tool travel. Whether the cut is climb milling or conventional milling depends on the contour direction, the spindle rotation, and whether the feature is internal or external.
Diagram comparing G41 cutter compensation left and G42 cutter compensation right Two programmed contours with direction arrows, showing the cutter centre positioned to the left of travel for G41 and to the right of travel for G42. G41 — left Programmed contour & direction of travel Cutter centre offset to the LEFT of travel Radius value taken from D register G42 — right Programmed contour & direction of travel Cutter centre offset to the RIGHT of travel
Figure 3. G41 and G42 describe which side of the programmed path the cutter centre sits on, not the milling mode. Climb or conventional is the result of that side plus contour direction, spindle rotation and whether the feature is internal or external.

Wear correction: work out the magnitude, then confirm the sign

Suppose a boss is programmed at ∅50.00 mm and measures ∅49.80 mm. A 0.20 mm diameter error corresponds to a 0.10 mm radial correction. Whether that 0.10 mm is entered as a positive or negative value in the wear register depends on whether the feature is internal or external, the active compensation side, and the offset convention used by your control — some controls expect diameter values, others radius values.

Practical rule: calculate the radial magnitude from the measurement, then make one small correction, re-cut and re-measure. If the error doubles instead of disappearing, the sign convention is inverted — not the measurement.

Tool length compensation and cutter compensation are large subjects in their own right. This guide keeps the boundary clear and stays focused on locating the workpiece.

05Before Setting a CNC Work Offset

Run through this before touching the offset page. Most datum errors are introduced before any measurement is taken.

  • Complete machine homing or reference return
  • Confirm metric or inch mode (G21 / G20)
  • Verify workholding rigidity and clamp positions
  • Confirm the datum specified on the drawing
  • Load the correct tool and its tool length offset
  • Clean chips and burrs from all locating surfaces
  • Confirm the active plane (G17) and coordinate system
  • Raise Z to a safe clearance position
  • Check probe or edge-finder calibration and runout
  • Record the existing offset values before overwriting them
  • Check that no local shift (G52) is still active
  • Confirm which offset register the program actually calls
Do not assume that G28 resets work offsets such as G54–G59. Confirm that the machine has completed its reference return or homing procedure using the approved command or operator procedure for that machine. Reference return re-establishes the machine coordinate system; it does not clear the values stored in the work offset registers.
Record before you overwrite. Writing down the previous G54 values takes ten seconds and is the fastest possible recovery when a setup turns out to have been correct all along.

06Method 1 — Set G54 with an Edge Finder

A mechanical edge finder is still the most common way to locate an X or Y datum on a manual setup. The method is reliable, but only if the geometry behind it is understood rather than copied.

  1. Locate the X datum

    Install the edge finder in the spindle and run it at the speed recommended by its manufacturer (commonly in the region of 800–1200 rpm for a standard mechanical type). Feed the workpiece edge towards the tip in small increments until the offset tip snaps into alignment, then note the machine X position at that moment.

  2. Compensate for the edge-finder radius

    At the moment of contact, the spindle centreline is one edge-finder radius away from the surface. The workpiece edge position equals the machine contact position plus or minus the edge-finder radius, where the sign depends on the direction of approach and the axis direction of your machine.

  3. Enter the value into the G54 X register

    Enter the compensated machine coordinate into the X field of the work offset page. Many controls also provide a “measure” or “set” function that captures the current position and applies a typed radius value for you — if you use it, confirm what it writes before relying on it.

  4. Repeat for Y

    Retract to clearance, move to the Y face, and repeat the same procedure with the same edge finder and the same approach discipline.

  5. Set Z independently

    Do not use a standard mechanical edge finder to establish Z. Use one of the Z-specific methods in section 08.

Calculation example

Machine X position at contact: −412.350 mm Edge finder diameter: 10.000 mm Edge finder radius: 5.000 mm Required workpiece datum: left edge of the part Approach was from the −X side, so the spindle centre sits one radius to the −X side of the surface: −412.350 mm + 5.000 mm = −407.350 mm Value entered into G54 X: −407.350
Sign warning: whether the radius is added or subtracted depends on the direction the edge finder approached the surface and on the axis direction convention of your machine. Work it out from the physical situation each time rather than memorising a sign.
Accuracy from a mechanical edge finder depends on the condition of the tip, spindle runout, approach speed, surface finish and cleanliness, machine repeatability and temperature. Treat any single published accuracy figure with caution — what matters is that the method is repeatable in your own setup and verified by measurement.
Edge finder touching the X edge of a workpiece with radius compensation shown Side view of a spindle-mounted edge finder contacting the left face of a clamped workpiece, showing that the spindle centreline is offset from the surface by the edge finder radius. Workpiece Spindle Edge finder Spindle centreline Contact point r = 5.000 Machine X at contact −412.350 Workpiece edge = contact ± radius −412.350 + 5.000 = −407.350 Datum surface
Figure 4. At contact the spindle centreline is one edge-finder radius away from the datum surface. The radius must be applied in the direction of approach — this is where sign errors are introduced.

07Method 2 — Find the Centre Between Two Edges

When the datum is the centre of a block, slot or bore, touching both sides and averaging is faster and less error-prone than a single-edge measurement, because the radius term cancels out.

Centre coordinate = (first edge coordinate + second edge coordinate) ÷ 2 Left edge contact: X = −420.000 mm Right edge contact: X = −320.000 mm Centre = (−420.000 + −320.000) ÷ 2 Centre = −370.000 mm
The same value is entered into the X field of the work offset register.

Why the radius cancels — and when it does not

Approaching from the left, the recorded machine position is one radius short of the surface. Approaching from the right, it is one radius past it, in the opposite direction. Averaging the two readings cancels the two equal and opposite radius terms, so the result is the true centre without any radius arithmetic. That convenience only holds when all of the following are true:

  • The same edge finder, with the same effective radius, is used on both sides.
  • Both readings are machine coordinates, not positions displayed in a work coordinate system.
  • The approach method, feel and trigger point are consistent on both sides.
  • The two surfaces are parallel and both are clean and free of burrs.
  • Backlash is not affecting the readings — approach each side in a consistent direction and take up lost motion before the final increment.
If you take one reading with an edge finder and the other with a different tool or probe, the radius terms no longer cancel and the centre will be offset by half the difference between the two effective radii.
Finding the centre of a workpiece between two edges with an edge finder Top view of a rectangular workpiece touched on the left and right faces, with the two machine coordinates averaged to give the centre datum. Top view (XY plane) Workpiece — top view +r −r X = −420.000 left contact (machine) X = −320.000 right contact (machine) equal equal Centre X = −370.000
Figure 5. Averaging two contacts taken with the same edge finder cancels the radius term, provided both readings are machine coordinates and the approach discipline is identical on both sides.

08Setting the Z Datum

Z is not simply “the same procedure again”. A standard mechanical edge finder is designed for X and Y edge location and should not be used to establish Z zero. Choose a method that suits the surface, the accuracy required and the equipment available.

Common

Paper or feeler gauge

Quick and widely used. Lower the tool onto a slip of paper or a feeler gauge of known thickness, then subtract that thickness. Accuracy is limited by feel and gauge compression.

Repeatable

Tool setter / setting block

A block or gauge of certified height gives a consistent reference and removes most of the operator feel from the result. Subtract the block height from the recorded machine Z.

Automated

Electronic tool setter

A table-mounted setter with a signal output allows repeatable Z setting and, on many machines, automatic writing of tool length values.

Accurate

3D edge finder / touch probe

Provides a triggered, repeatable contact in X, Y and Z, and allows probing of surfaces that are difficult to reach by feel.

Reference

Gauge block of known length

Useful where a fixture face rather than the part face is the intended Z reference, or where the part top is not machined.

Decide first

Which surface is Z zero?

Part top face, finished floor, fixture face or vice jaw — the correct answer comes from the drawing datum, not from convenience. Write it into the setup sheet.

Setting the CNC Z work offset with a tool setter block on the workpiece top face Side view showing a cutter resting on a setting block of known height on top of a workpiece, with the block height subtracted from the recorded machine Z position. Workpiece Setting block Tool at contact with block 50.000 Z zero = part top face Machine Z at contact −270.000 minus block height 50.000 G54 Z = −320.000
Figure 6. Z datum set from a certified setting block. The recorded machine Z at contact is corrected by the block height to give the offset for the part top face. Confirm whether your control expects the tool length offset to be active during this measurement.
Decide in advance whether Z is being handled through the work offset, through tool length offsets, or through a combination of both, and apply that decision consistently across every tool in the job. Mixing the two conventions mid-setup is a classic cause of depth errors that appear only after a tool change.

09Method 3 — Set the Work Offset with a Touch Probe

A spindle-mounted touch probe removes most of the operator feel from datum setting, shortens setup time and — importantly for production work — makes the datum repeatable between shifts and between operators.

Common probing routines

Single-surface probing for a face datum; bore or boss centre probing for cylindrical features; rectangular pocket or web probing for a centre between two pairs of faces; corner probing for an X/Y datum in one cycle. Most controls with a probing option can write the measured result straight into a chosen work offset register.

What determines the result

Probe calibration against a known ring or sphere, effective stylus radius, stylus length and stiffness, approach feed, trigger repeatability, and how square the feature is to the axes. A probe that has not been recalibrated after a stylus change will produce confident, repeatable, wrong numbers.

Safe practice

Use protected positioning moves so the probe stops on unexpected contact, keep rapid overrides reduced during the first run of a new routine, and confirm the clearance distances written into the cycle before starting it. Probe overtravel is expensive.

Where it pays off

Repeat orders, multi-station fixtures, second-operation setups and any job where the same datum has to be re-established many times. Probing also allows in-process verification that the datum has not shifted after roughing.

Probing macro programs are specific to the probe manufacturer, the control and the software version installed. Use the cycle documentation supplied with your system rather than adapting macro code found online.

10Method 4 — Set Work Offsets Using G10

G10 allows qualified users to write offset values programmatically instead of typing them on the offset page. It is powerful for fixtures with known station spacing, family-of-parts programs and pallet work — and it is unforgiving, because a single wrong address rewrites a datum without asking for confirmation.

The exact G10 syntax varies by controller. Always confirm the required L and P values in the machine builder or control manufacturer manual before running the program. Do not assume that a format taken from another machine is valid on yours.

FANUC-style format

On common FANUC-style controls, standard work offsets G54–G59 are written with L2, where P1 corresponds to G54, P2 to G55, P3 to G56 and so on. Extended offsets typically use a different L value.

%
O1001
G90 G17 G40 G49 G80              ( safe start state )

G10 L2 P1 X-250.000 Y-150.000 Z-320.000   ( write G54 )
G10 L2 P2 X-450.000 Y-150.000 Z-320.000   ( write G55 )

G54
M98 P2000                        ( machining subprogram )

G55
M98 P2000

G53 G00 Z0.                      ( retract in machine coordinates )
M30
%
Example only. Syntax, signs and offset-writing behaviour vary by machine and control. Verify the program in graphics, simulation, single-block and dry-run modes before machining.

Haas and Siemens

Haas controls support G10 for programmable offset setting and also expose G54–G59 plus extended G154 P1–P99 work coordinate systems; check the operator’s manual for the exact address structure on your machine and software version. Siemens SINUMERIK controls describe the same concept as settable zero offsets, typically addressed through G54–G57 and extended offset frames, and written through the zero-offset data rather than a FANUC-style G10 L2 block. The concept transfers; the syntax does not.

Good practice: keep offset-writing blocks in a short, clearly named setup program rather than buried in a production program, so nobody rewrites a datum by accidentally running the wrong file.

11How to Use Multiple Work Offsets

Multi-station work offsets allow the same validated toolpath to be applied to multiple workpieces while maintaining an independent datum for each fixture position. The machining logic is proven once, then reused — which is why this approach underpins most efficient low-volume and repeat production.

G54
M98 P1000        ( station 1 )

G55
M98 P1000        ( station 2 — same subprogram )

G56
M98 P1000        ( station 3 )
Each station is measured and stored independently, so a datum error at one station does not shift the others.

Why it improves consistency

The cutting strategy, feeds, stepovers and tool list are identical at every station. Only the datum changes. Variation between parts is reduced to fixture and material variation instead of programming variation.

What to watch

Confirm that the subprogram contains no absolute machine-coordinate moves that would ignore the active offset, that tool changes return to a safe Z between stations, and that each station’s offset has been verified individually before running the full cycle.

G52 local shifts

Where a control supports G52, a local shift can be applied on top of the active work coordinate system — convenient for repeated features at a fixed distance from the main datum.

G52 X0 Y0 Z0        ( clear the local shift on many controls )
On many controls, G52 X0 Y0 Z0 clears the local coordinate shift. G53 commands a move in the machine coordinate system for that block only and should not be described as a universal method for cancelling G52.
G52 behaviour may differ between controls and parameter configurations. On some machines a local shift survives a program end or a reset. If a part is offset by an amount nobody can account for, an uncleared local shift is one of the first things to check.

12FANUC, Haas, Siemens and Heidenhain Differences

The underlying idea is the same on every control: store the distance from machine zero to the part datum. The terminology, the screen you edit it on and the way extended offsets are addressed are not.

ControlWhere offsets are editedNotes
FANUCOFFSET / SETTING → WORKStandard G54–G59; extended work coordinate systems commonly addressed as G54.1 P__ where fitted. Screen names vary by model and series.
Haas (NGC)OFFSET → WorkG54–G59 plus extended G154 P1–P99 work coordinate systems on supporting machines.
Siemens SINUMERIKZero offset / work offset dataDescribed as settable zero offsets; commonly G54–G57 plus extended offset frames. Terminology and handling differ from FANUC-style G10.
MitsubishiCoordinate / work offset pageStandard six work coordinate systems with extended sets on many series; menu layout varies by series.
HeidenhainPreset table / datum tableUses a preset-table workflow and different terminology; the mental model of “select a stored datum” still applies, but the operating sequence is distinctly different.
Exact key sequences are deliberately not listed here. Softkey paths change between machine models, control generations and software versions, and a confidently wrong key sequence is more dangerous than no key sequence at all. Use the operator manual supplied with your specific machine.

13How to Verify a Work Offset Safely

Setting the offset is half the job. Proving it before the tool is in the cut is the half that protects the part, the fixture and the spindle.

  1. Confirm the active work offset

    Check on the position or program screen that the code the program actually calls — G54, G55 or another — is the register you just set.

  2. Confirm absolute or incremental mode

    G90 versus G91. An incremental block left active where an absolute move is intended is a fast way to lose a fixture.

  3. Confirm units

    G21 metric or G20 inch, matched between the program and the control state.

  4. Verify the tool length offset

    Confirm the H register matches the tool actually in the spindle, and that G43 is called before any Z move into the work.

  5. Move to a safe Z clearance height

    Retract clear of the part and fixture before any test motion. Where supported, use G53 G00 Z0. or the machine’s documented safe retract.

  6. Run graphics or simulation

    Check the toolpath position relative to the stock boundary in the control’s graphics mode or in your CAM verification.

  7. Run in single block

    Step through the approach moves with a hand on the feed hold.

  8. Reduce rapid and feed override

    Bring rapid override down for the first approach so there is time to react.

  9. Perform an air cut above the part

    Offset Z upward by a safe amount and run the cycle clear of the material to confirm the XY position visually.

  10. Take a light verification cut

    Use a controlled verification cut of approximately 0.05–0.20 mm where appropriate. The correct depth depends on material, tool, stock allowance, machine rigidity and what you are trying to prove.

  11. Measure the result

    Measure from the actual datum features called on the drawing, not from a convenient edge.

  12. Apply wear correction if required

    Correct in the wear register, re-cut and re-measure. Do not chase a dimension by editing the work offset unless the datum itself is wrong.

Never rely on dry run alone. Verify the active work offset, tool length offset, units, spindle direction, fixture clearance and safe Z position before cycle start. Dry run changes how the machine moves; it does not prove that the datum is correct.
Where the machine offers optional stop, use it to break the first approach into reviewable stages. Where it offers a Z-axis lock or single-axis inhibit, use the function as documented by the builder — do not improvise a way to suppress an axis.

14Common CNC Work Offset Errors

Most datum faults produce a characteristic symptom. Reading the symptom correctly usually points straight at the register that needs attention.

SymptomLikely causeCorrective action
Tool moves to the wrong fixture or stationWrong G54–G59 activeCheck which code the program calls and which register holds the correct values
Every feature is shifted by the same amountIncorrect work offset valueRecheck the datum measurement and the sign applied to the edge-finder or probe radius
Z depth is consistently wrong on all toolsZ work offset errorRe-establish Z from the intended datum surface and confirm the block or gauge height used
Depth error appears only after a tool changeWrong H register or missing G43Match tool number to H register and confirm the length offset call in the program
Everything is out by a factor of about 25.4G20 / G21 mismatchConfirm program units against the control state and the offset page units
Centre feature is off by a consistent small amountEdge-finder or stylus radius error, or mismatched tools between the two contactsRecalibrate, then recalculate the centre using two readings taken with the same instrument
Offset appears to change after a reset or restartLocal shift not cancelled, or macro variable still activeClear G52, check macro variables and confirm the control’s power-on behaviour
Shift is mirrored — correct magnitude, wrong directionSign convention errorVerify machine axis directions and which way the radius should have been applied
First part is correct, later parts driftFixture movement, thermal growth or chip build-up on locatorsRe-verify the datum, clean locating faces and review clamping and warm-up practice

15Complete Worked Example

Setting G54 at the top-centre of an aluminium block, with every number carried through from contact to verification.

120 × 80 × 40
6061-T6 block, mm
∅10.000
Mechanical edge finder
50.000
Setting block height, mm
Top centre
Drawing datum

Setup conditions

  • Block held in a precision vice on parallels, machined faces against the fixed jaw and parallels.
  • Machine homed; metric mode confirmed; G17 active; existing G54 values recorded before any change.
  • Datum required by the drawing: X and Y at the centre of the block, Z on the top face.
Built-in sanity check. Two contacts taken from opposite faces with the same edge finder are separated by the part width plus one edge-finder diameter. Before writing anything into the offset page, confirm that |contact 2 − contact 1| − edge finder ∅ equals the measured part size. If it does not, one of the readings is wrong — stop and re-measure.

Step 1 — X contacts

Left face contact (machine X): −425.000 Right face contact (machine X): −295.000 Separation check: |−295.000 − (−425.000)| = 130.000 130.000 − 10.000 (edge finder ∅) = 120.000 mm = block width OK Centre X = (−425.000 + −295.000) ÷ 2 = −360.000

Step 2 — Y contacts

Front face contact (machine Y): −238.000 Back face contact (machine Y): −148.000 Separation check: |−148.000 − (−238.000)| = 90.000 90.000 − 10.000 = 80.000 mm = block width OK Centre Y = (−238.000 + −148.000) ÷ 2 = −193.000

Step 3 — Z datum

Machine Z with tool resting on setting block: −270.000 Certified setting block height: 50.000 Z at part top face = −270.000 − 50.000 = −320.000
This assumes Z is being carried in the work offset with the tool length offset handled separately and consistently. Confirm which convention your shop and control use.

Step 4 — Values written to G54

AxisValue enteredDerived from
X−360.000Average of two X contacts, radius terms cancelled
Y−193.000Average of two Y contacts, radius terms cancelled
Z−320.000Contact position corrected by certified block height

Step 5 — Verification actions

  1. Confirm G54 is the active offset and that the program calls it.
  2. Jog to X0 Y0 in the work coordinate system and confirm visually that the spindle is over the centre of the block.
  3. Jog to two known corner positions (X−60 Y−40 and X+60 Y+40) and confirm they land on the block corners.
  4. Run the cycle as an air cut at a raised Z.
  5. Take a 0.10 mm facing pass and confirm it cleans evenly across the top — an uneven witness indicates a Z or workholding problem, not an XY datum problem.
  6. Measure a machined feature back to the datum and record the result on the setup sheet.
Why the corner check matters: confirming X0 Y0 only proves one point. Checking two opposite corners proves the datum, the axis directions and the part size at the same time, and catches a mirrored sign error before it becomes a scrapped part.

16How Work Offset Control Affects Part Accuracy

Accurate work-offset management is essential in low-volume and repeat production. A machining program may be dimensionally correct, but an incorrect datum, fixture offset or tool-length register can shift every machined feature on the part. For precision components, the offset-setting process should be integrated with fixture qualification, first-article inspection, in-process probing and documented setup control — not left as an undocumented operator habit.

Repeatability

Datum & fixture qualification

Locating faces are qualified before production so the same datum is re-established every time a part is loaded, rather than re-measured differently by each operator.

Consistency

Multi-station offsets

One validated toolpath applied across several fixture stations, each with an independent, verified datum — the basis of consistent batch output.

Control

In-process probing

Datum verification after roughing catches fixture movement and thermal drift before finishing passes are cut.

Evidence

First-article inspection

The first part is measured against the drawing datum scheme and documented, so the setup is proven before the batch runs.

Traceability

Documented setup sheets

Datum definition, offset registers, tool list and inspection points are recorded, so a repeat order reproduces the same setup rather than reinventing it.

Complex work

Multi-axis datum strategy

On 4- and 5-axis work, related features are held under one datum system wherever practical, so positional relationships do not depend on re-clamping accuracy.

Need Precision CNC Parts with Controlled Datums and Inspection?

Goldcattle has manufactured custom precision components in Xiamen, China for 26 years as a national high-tech enterprise, with in-house CNC machining, injection moulding, mould making, die casting, 3D printing and sheet metal — no outsourced production. Send a drawing or 3D model and our engineering team will review datum scheme, workholding, process route and inspection requirements before quoting.

3-axis / 4-axis / 5-axis machining Metals & engineering plastics Prototypes to production batches Dimensional inspection & FAI reports Drawing-based quotation ISO 9001 certified

Tolerances are evaluated according to part geometry, material, feature size and inspection requirements. Capability figures quoted for specific processes apply to suitable features under controlled conditions and are confirmed per part at quotation.

17CNC Work Offset FAQs

What is a CNC work offset?

A CNC work offset is the stored distance between machine zero and a datum chosen on the workpiece or fixture. It lets a program written in part coordinates run correctly wherever the part happens to be clamped in the machine envelope.

What is the difference between G54 and G55?

They are two independent work coordinate systems, each holding its own set of axis offsets. Typically G54 is used for the first part or fixture and G55 for a second workpiece or fixture station, so the same toolpath can be applied at a different datum simply by changing the active code.

Does G28 reset G54?

Normally no. G28 is used to return to a reference point; the values stored in the G54–G59 registers are held in the work offset table and are not cleared by a reference return. Reference return re-establishes the machine coordinate system. Behaviour depends on the control and machine configuration, so confirm in the manual for your machine.

How do I set G54 with an edge finder?

Touch the datum surface with the edge finder, note the machine coordinate at contact, apply the edge-finder radius in the direction of approach, enter the result into the corresponding axis field of the G54 register, then verify by jogging to known positions before cutting. Repeat for the second axis, and set Z with a method suited to Z rather than with a standard mechanical edge finder.

What is the difference between G52 and G53?

G52 applies a local coordinate shift on top of the active work coordinate system on controls that support it. G53 is a non-modal command that moves in machine coordinates for that block only. They are different functions, and G53 should not be described as a general way to cancel G52 — on many controls the local shift is cleared with G52 X0 Y0 Z0.

Can G10 overwrite work offsets?

Yes, on controls that support it. On common FANUC-style controls, G10 L2 P1 writes the G54 register, P2 writes G55, and so on. The exact L and P addressing, and whether extended offsets can be written the same way, vary by control — confirm in the machine or control manufacturer manual before running the program.

Why is my CNC part shifted after changing tools?

If the shift appears only after a tool change, the work offset is usually not the problem. Check that the H register matches the tool in the spindle, that the tool length offset is called correctly, that the tool was measured with the same convention as the others, and that the tool is fully seated in the holder.

How accurate is an edge finder?

It depends on the condition of the edge finder, spindle runout, approach speed and operator technique, surface finish and cleanliness of the datum face, machine repeatability and temperature conditions. Rather than relying on a single published accuracy figure, establish what your own setup repeats to, and verify the datum by measurement on the first part.

About this guide

Written by: Goldcattle CNC Engineering Team Technical review: Goldcattle CNC manufacturing team Published: Updated:

The procedures in this guide reflect common machining-centre setup practices used in our own production. Actual menu paths, offset signs and G-code syntax vary by machine builder, control model, parameter configuration and shop standard. Nothing here replaces the operator, programming and safety manuals supplied with your machine.

Recommended Reading