CNC Tool Length & Work Offset Calibration: G43, G49, G54 Explained with Probing Examples
Tool length and work offsets form the foundation of CNC accuracy.
They define the exact position of the cutting tool relative to the workpiece — ensuring consistent depth, contour precision, and zero setup errors.
📌 1. What Is Tool Length Compensation?
Every cutting tool has a different physical length.
Tool length compensation allows the CNC to adjust Z-axis positions automatically based on the active tool.
- G43: Apply tool length offset
- G49: Cancel tool length offset
- Hxx: Calls the specific tool offset number (usually matches tool number)
📌 2. Basic Tool Length Command (Fanuc / Haas)
G43 H01 Z100. (Apply tool offset #1)
| Code | Meaning |
|---|---|
| G43 | Activates tool length compensation |
| H01 | Uses offset register #1 |
| Z100. | Moves tool tip 100 mm above work offset zero (e.g. G54) |
📌 3. Example: Safe Tool Change and Offset Activation
%
O4001 (G43 TOOL LENGTH EXAMPLE)
G90 G17 G21 G40 G80 G54
T01 M06
G00 G43 H01 Z100.
S2500 M03
G00 X0 Y0
G01 Z-10. F200
G00 Z100.
M05
G49
M30
%
| Sequence | Description |
|---|---|
| G43 H01 | Apply tool offset |
| Z-10. | Cuts 10 mm deep relative to G54 work offset |
| G49 | Cancels tool length compensation after operation |
📌 4. How It Works Internally
- Machine home position = Machine Coordinate System
- G54 = Work offset (part zero position)
- G43 + Hxx = Tool offset (distance from tool reference to tip)
Total Z position = Machine zero − Tool offset − Work offset
This ensures every tool reaches the correct surface even if tools have different physical lengths.
📌 5. G49 — Cancel Tool Length Offset
G49
Used after machining or tool change to cancel active length compensation.
If you forget to cancel, the next tool might crash due to wrong offset.
📌 6. Example: Multi-Tool Program with Offsets
%
O4002 (MULTI TOOL OFFSET)
G90 G17 G21 G40 G80 G54
T01 M06
G00 G43 H01 Z100.
G01 Z-10. F200
G00 Z100.
T02 M06
G00 G43 H02 Z100.
G01 Z-8. F200
G00 Z100.
M05
G49
M30
%
Each tool uses its own H value, ensuring perfect Z-depth across different tool lengths.
📌 7. Setting Tool Offsets Manually
| Step | Action | Example |
|---|---|---|
| 1 | Bring tool to part surface | Z = 0 on part |
| 2 | Read machine Z position | Example: Z = -312.450 mm |
| 3 | Enter this value into tool offset H01 | Stored in tool table |
Now, when G43 H01 is called, the CNC automatically compensates for that 312.450 mm tool length.
📌 8. Automated Tool Length Measurement (Tool Setter)
Many CNCs include an automatic tool setter on the table.
Probing macros (Fanuc-style) simplify the calibration process.
Fanuc Example:
G65 P9811 Z-300. H01
| Code | Description |
|---|---|
| G65 P9811 | Run tool length probing cycle |
| Z-300. | Safe move limit |
| H01 | Save measured value to offset #1 |
Haas Example:
G65 P9023 H01
Automatically measures tool length and stores it in offset table.
📌 9. Work Offset Calibration (G54)
Work offsets define where the part zero is in X, Y, and Z.
This can be set manually, or automatically using a probing cycle.
Fanuc Work Offset Probe:
G65 P9810 Z-50. F200.
Haas Example:
G65 P9021
Both automatically write G54 Z offset after touching the part surface.
📌 10. Siemens Example
TOOL LENGTH MEASURE ON
MEASURE TOOL 1
G54
TRAORI
Siemens stores tool and work offsets as separate coordinate transformations.
📌 11. Heidenhain Example
TOOL DEF 1 L+0 R+0
CYCL DEF 240 TOUCH PROBE 1
Q200=+2 ; CLEARANCE
Q201=-50 ; DEPTH
Q206=+0.25 ; FEED
CYCL CALL
Automatically updates the tool length table for TOOL 1.
📌 12. Best Practices
- Always call G43 immediately after tool change (Txx M06).
- Match tool number = H number for easy tracking.
- Use G49 after machining to cancel compensation.
- Re-probe tool offsets weekly or after crashes.
- For multi-fixture setups, combine with G54–G59 work offsets.
📌 13. Common Mistakes
| Mistake | Result |
|---|---|
| Forgetting G43 | Tool cuts above part (no offset applied) |
| Wrong H number | Tool cuts too deep or crashes |
| No G49 | Next tool inherits wrong offset |
| Incorrect G54 | Z-depth off, potential collision |
📌 14. Advanced Example — Fully Automated Setup
%
O4010 (FULL PROBE CALIBRATION)
G90 G17 G21 G40 G80
T01 M06
M08
(--- TOOL LENGTH MEASURE ---)
G65 P9811 Z-250. H01
(--- WORK OFFSET PROBE ---)
G65 P9810 Z-50. F200.
(--- MACHINE OPERATION ---)
G43 H01 Z100.
G54
G01 Z-10. F150
G00 Z100.
M09
G49
M30
%
The program measures tool and part zero automatically, applies compensation, and ensures safe operation.
📌 15. Future Trends (2025–2030)
- AI-driven calibration: Probes auto-detect incorrect offsets and suggest corrections.
- Wireless tool measurement: Bluetooth-enabled tool setters for real-time updates.
- Digital twin offset syncing: CNC and CAM share identical offset databases for zero setup time.
✅ Conclusion
Mastering G43, G49, and G54 ensures perfect Z-depth, safer operations, and faster setups.
Whether using manual measurement or automated probing, proper offset calibration is the key to precision machining and zero scrap production.
Leave a comment