G54, G55 & CNC Work Offsets: Practical WCS Setup Guide
Understand how G54, G55 and CNC work offsets establish the work coordinate system, how machinists set work zero, how multiple fixtures are programmed, and how to prevent offset-related machining errors.
What Is a CNC Work Coordinate System?
A CNC machine has its own machine coordinate system established by the machine builder. Your drawing, however, normally defines features from engineering datums or a part reference point.
The work coordinate system bridges these two references. It allows the CNC program to describe the component using a practical part zero rather than programming every position from the machine’s physical reference location.
For a simplified three-axis model, the programmed work coordinates are interpreted together with the active work-coordinate translation. The exact internal coordinate transformation depends on the CNC control, machine configuration, tool compensation, rotary transformations and other active functions.
For a broader explanation of CNC programming and process planning, see the CNC Machining Process Guide .
What Are G54 and G55?
G54 and G55 are work coordinate system selections commonly used on Fanuc-, Haas- and LinuxCNC-style controls. They allow different work origins to be stored and selected during machining.
| Code | Purpose | Typical Application |
|---|---|---|
| G54 | Work coordinate system 1 | First part, fixture station or setup |
| G55 | Work coordinate system 2 | Second part, fixture station or setup |
| G56 | Work coordinate system 3 | Additional fixture location |
| G57–G59 | Additional work coordinate systems | Multiple setups or fixture locations |
The important point is that G54 is not inherently the left side of the fixture and G55 is not inherently the right side. They are simply separate coordinate systems. Your setup sheet defines what physical location each offset represents.
Extended work offsets may also be available on some controls, but the exact numbering and functionality are controller-specific.
Machine Zero vs Work Zero
Machine Coordinate System
The machine coordinate system is established by the CNC machine and its reference/homing system. It provides a consistent machine reference for axis positions.
Machine coordinates are generally not the coordinates an engineer wants to use when defining a hole pattern or pocket location on a component.
Work Coordinate System
The work coordinate system places program zero at a useful location on the part or fixture.
Examples include the top-left corner of a plate, centre of a circular component, centre of a hole pattern, or a controlled fixture datum.
Work offsets establish the relationship between the program and the physical workpiece. Tool length and cutter compensation are separate functions.
This distinction becomes especially important when troubleshooting a part that is machining at the wrong Z height. A problem may originate from the work offset, tool length offset, tool setter, probe measurement, fixture height or CAM datum.
Choosing the Work Datum
The most important decision before entering a G54 or G55 value is not the number itself. It is deciding exactly what physical feature that number represents.
The programmed origin should normally be connected to the drawing’s functional datum structure and to a repeatable physical location on the machine.
Common WCS Origin Choices
| Origin | Useful For | Consideration |
|---|---|---|
| Top face + corner | Plates, brackets and prismatic components | Simple programming and easy probing |
| Top face + centre | Symmetrical components and hole patterns | Useful when geometry is centred |
| Hole or pin centre | Fixtures and components located from holes | Requires reliable feature location |
| Fixture datum | Production machining | Excellent repeatability when the fixture is controlled |
| Machined datum face | Second-operation machining | Datum transfer must be controlled |
For practical guidance on datum selection, connect this decision with the GD&T for CNC Machining Guide and High-Precision CNC Design Rules .
How to Set a CNC Work Offset
The exact button sequence differs between CNC controls, but the engineering workflow is broadly the same.
Confirm which drawing feature or fixture reference is intended to become X0, Y0 and Z0.
Seat the component against the intended locators, stops and clamps.
Use an edge finder, indicator, probe, known reference feature or another approved setup method.
Store the measured relationship in G54, G55 or the work offset specified by the setup sheet.
Compare the displayed value against the expected setup condition.
Verify the active WCS, clearance and first rapid/feed movement before running the complete machining cycle.
Probing can reduce operator-to-operator variation and can support automatic setup verification, but the probe itself must be correctly calibrated and the probing cycle must be appropriate for the machine and control.
For fixture selection and repeatable part location, see CNC Fixturing & Workholding .
Using G54 and G55 for Multiple Parts
One of the most useful applications of multiple work offsets is machining several identical components on the same fixture.
Imagine two identical parts mounted 150 mm apart in X with the same orientation and the same datum strategy.
Part A can use G54 and Part B can use G55.
For identical orientations, the difference between the two work origins can be treated as a fixture-location relationship:
ΔXG55-G54 = Xfixture,B − Xfixture,AThis is a setup-planning relationship, not a universal CNC-control formula. The actual stored offset values depend on the machine’s coordinate system and control.
The same machining program can then be reused by changing the active work coordinate system.
However, if Part B is rotated 180° or mounted in a different orientation, simply changing G54 to G55 may not be sufficient. The programmed coordinate directions and machining planes must still correspond to the physical setup.
G54 & G55 CNC Programming Example
A simplified three-axis program structure could look like this:
%
O1001 (TWO PART FIXTURE)
G90 G17 G21
G40 G49 G80
T1 M6
G54
G0 G43 H1 Z50.
(MACHINE PART A)
G0 X20. Y20.
...
G0 Z50.
G55
(MACHINE PART B)
G0 X20. Y20.
...
G0 Z50.
M30
%
Selecting G55 does not physically move the machine from Part A to Part B. The next motion command is interpreted using the newly active work coordinate system.
Why This Structure Is Useful
- The WCS selection is explicit.
- The same toolpath can be reused for identical parts.
- The setup sheet can clearly identify which fixture station uses G54 or G55.
- Program duplication is reduced.
- Offset errors are easier to diagnose.
Always verify the exact syntax, modal behaviour and machine-specific functions against the CNC control manual before using a program in production.
CNC Work Offset Verification Checklist
Before pressing cycle start, a disciplined offset verification can prevent a large percentage of setup-related errors.
- Machine is referenced/homed according to the machine procedure.
- Correct CNC program and revision are loaded.
- Correct G54/G55 number is identified on the setup sheet.
- Physical part is located against the correct fixture datums.
- Fixture stops and locating surfaces are clean.
- Work offset values have been checked.
- Tool length offsets have been checked separately.
- Correct units are active.
- Absolute/incremental programming mode is correct.
- No unintended coordinate shift or modal function is active.
- Safe Z clearance has been verified.
- First rapid movement has been checked.
- Single-block, graphics, dry-run or reduced rapid override is used where appropriate.
- First-off component will be inspected against the drawing.
For a wider production-readiness review, use the CNC DFM Checklist .
Common G54 & G55 Work Offset Problems
| Problem | Likely Cause | What to Check | Corrective Action |
|---|---|---|---|
| Part machines in the wrong location | Wrong WCS active | Active G54/G55 and setup sheet | Correct the WCS selection and prove the program |
| All features on one fixture station are shifted | Incorrect work offset | G54/G55 values and physical datum | Re-establish the correct datum |
| Z depth is incorrect | Wrong Z work zero or tool length offset | Work offset and tool H value separately | Identify which coordinate system is incorrect before editing anything |
| Offset changes between parts | Part location or fixture repeatability problem | Stops, pins, chips and clamping | Correct the physical location process |
| G55 works for one setup but not another | Setup datum changed | Setup sheet vs actual fixture | Re-establish the WCS using the intended datum |
| Hole pattern is consistently shifted | Incorrect origin or datum transfer | Drawing datum structure and WCS origin | Review datum strategy and setup |
| Progressive dimensional drift | Tool wear, thermal effects, fixture movement or machine factors | Trend of measured parts | Do not blindly change G54/G55; identify the source of drift |
Inspection & Process Control
A work offset itself is normally not an inspection feature. The result of the coordinate system is evaluated through the manufactured part’s dimensions, locations and datum relationships.
| Requirement | Possible Inspection Method |
|---|---|
| Simple linear dimension | Micrometer, vernier/caliper or suitable gauge |
| Datum-related height | Height gauge and surface plate |
| Fixture alignment | Indicator |
| Hole diameter | Pin gauge, bore gauge or suitable precision instrument |
| Complex positional relationship | CMM or appropriate GD&T inspection method |
| Pre-machining setup location | CNC probing or approved setup measurement |
Probing can verify the setup before machining, but it does not replace final inspection of the finished component when drawing requirements demand it.
For tolerance planning, see the CNC Machining Tolerances Guide .
DFM Considerations for Work Offsets
Work offset problems are often created upstream during fixture and component design. A good CNC design should make the datum scheme repeatable and physically accessible.
Design for Repeatable Location
- Provide stable datum surfaces.
- Provide suitable locating areas for the fixture.
- Keep clamps away from critical machining zones.
- Relate critical features to functional drawing datums.
- Avoid relying on unstable or cosmetic surfaces for precision location.
- Consider how the component will be re-located during second operations.
Multiple Setups
If a component requires several setups, the datum-transfer strategy becomes important. G55 does not compensate for poor physical re-location.
When several faces need machining and maintaining positional relationships is difficult, a 4-axis or 5-axis strategy may reduce the number of setups.
See Manufyn’s 4-Axis CNC Machining and 5-Axis CNC Machining guides for further setup considerations.
Production & Cost Considerations
G54 and G55 do not inherently make a CNC machine faster. Their value comes from simplifying setup and allowing a controlled program to be reused across multiple work locations.
| Approach | Potential Benefit | Potential Risk |
|---|---|---|
| Separate program for every fixture station | Simple concept for inexperienced operators | More programs to maintain and revise |
| G54/G55 multiple work offsets | Reuse of common toolpath | Wrong WCS selection can shift the complete operation |
| Dedicated fixture | Repeatable physical location | Upfront fixture cost |
| Probe-based setup | Reduced manual measurement and setup variation | Requires reliable probing process and calibration |
The correct approach depends on production volume, tolerance requirements, fixture complexity, setup frequency and the cost of scrap or rework.
For the broader economics of CNC production, see CNC Machining Cost .
See Workholding & Setup Strategy in Real CNC Manufacturing
Work offsets become especially important when a component depends on repeatable fixture location, multiple machining operations or reduced setup count.
Explore Manufyn’s Precision Linear Guide Rail CNC Machining Case Study to see an example involving precision machining, workholding and multi-axis manufacturing.
You can also explore the complete Manufyn Case Study Library for practical manufacturing examples.
Continue Learning
Work offsets should be considered together with CNC programming, datum selection, workholding, tolerancing and DFM.
Frequently Asked Questions
What is G54 in CNC machining?
G54 selects a stored work coordinate system. It allows the CNC program to reference the component from a defined work zero rather than directly from the machine coordinate system.
What is G55 used for?
G55 selects another stored work coordinate system. A common application is using G54 for one fixture location and G55 for another location when machining multiple parts.
What is the difference between G54 and G55?
Both are work coordinate systems. The difference is that they contain separate offset values and therefore can represent different physical work origins.
Does changing from G54 to G55 move the CNC machine?
No. Selecting another work coordinate system changes how subsequent programmed coordinates are interpreted. A physical movement occurs only when a motion command is executed.
Are G54 and G55 tool offsets?
No. G54 and G55 are work coordinate system selections. Tool length and cutter compensation are separate from the work coordinate system.
Can the same CNC program be used with G54 and G55?
Yes, when the parts or fixture locations use compatible geometry, orientation and datum logic. The program must still be verified against the actual setup.
What happens if a G54 or G55 offset is wrong?
The programmed toolpath can be executed at the wrong physical location. Depending on the error, this can produce scrap, incorrect dimensions or a collision with the fixture or workpiece.
Is G54 always the first work offset?
G54 is commonly used as the first work coordinate system, but machine and controller conventions can differ. Always follow the machine’s setup procedure and program documentation.
Have a CNC Machining Drawing?
Send your drawing to Manufyn for manufacturability review and quotation. Our team can evaluate datum strategy, workholding, machining approach, tolerances and production requirements.
Discuss Your CNC Machining Requirement