Tool Length Compensation in CNC: G43, G44, and G49 Explained with Real Machining Examples
In CNC machining, tool length compensation allows the controller to account for the actual physical length of a tool when moving along the Z-axis. This ensures accurate and safe cutting depths, even when tools of different lengths are used.
🧮 What Is Tool Length Compensation?
The distance from the machine’s reference point (usually the spindle face or table) to the tool tip varies depending on:
- Tool type (drill, end mill, face mill)
- Tool holder type
- Setup height
Tool length compensation (TLC) helps avoid reprogramming Z values for every tool. You store the length offset in the machine’s offset table and activate it during your G-code execution.
📘 G-Codes for Tool Length Compensation
| G-Code | Function |
|---|---|
| G43 | Apply positive tool length offset |
| G44 | Apply negative tool offset (rare) |
| G49 | Cancel tool length compensation |
G43 is by far the most commonly used and industry standard for positive-length tools.
🧰 Real-World Example
Let’s say:
- Tool 1 (T01) has a length of 120.0 mm
- Tool 2 (T02) has a length of 105.0 mm
- Your program Z0.0 is the top of the part
Instead of adjusting Z-values for every tool, use G43 and the corresponding H value.
📐 G-Code Example
T1 M06 ; Load Tool 1
G90 G17 G21 ; Absolute, XY plane, metric
G54 ; Work offset
G00 X0 Y0
G43 H01 Z100.0 ; Activate tool length compensation using H01
S1200 M03 ; Start spindle
G01 Z-10.0 F200 ; Cut 10mm below top surface
...
G00 Z100.0
M09
G49 ; Cancel compensation
M30
| Code | Meaning |
|---|---|
H01 | Uses length offset stored in table for Tool 1 |
G43 | Applies the offset positively |
G49 | Cancels TLC at the end |
🔧 Tool Offset Table Example
| Offset # | Tool # | Length (mm) |
|---|---|---|
| H01 | T01 | 120.0 |
| H02 | T02 | 105.0 |
| H03 | T03 | 115.5 |
Controller uses the value in Hxx to adjust the Z-axis movement during program execution.
🔎 G43 vs. G44
| Code | Function | Use Case |
|---|---|---|
| G43 | Standard positive offset | ✅ Use this always |
| G44 | Negative offset (old systems) | ❌ Avoid unless specified |
| G49 | Cancel TLC | Always use at the end of tool ops |
Most modern CNCs ignore or don’t support G44 unless configured specifically.
🧠 Best Practices
- ✅ Always set your Z reference point (top of stock, table, or fixture)
- ✅ Use G43 before every toolpath with new tool
- ✅ Cancel TLC using G49 before tool change or program end
- ✅ Match H number with T number for clarity (T1 ↔ H01)
- ✅ Touch off each tool or use a probe for accuracy
⚠️ Common Mistakes
- ❌ Using wrong H number (mismatch = crash risk!)
- ❌ Forgetting G43 = tool will plunge too deep
- ❌ Skipping tool offset setup in controller
- ❌ Reusing offset numbers without checking values
📏 Visualization
Assume:
- Tool is 100 mm long
- Z0 = top of part
- Rapid to Z100 with G43 H01
If H01 = 100 mm, spindle face stops at Z100 – 100 = Z0 (tool tip at surface).
🔄 Full Multi-Tool Example
%
O1001 (Multi-tool with TLC)
G90 G17 G21
(--- TOOL 1 ---)
T1 M06
G00 G54 X0 Y0
G43 H01 Z100.0
S1200 M03
G01 Z-5.0 F200
G00 Z100.0
G49
(--- TOOL 2 ---)
T2 M06
G00 G54 X50 Y50
G43 H02 Z100.0
S1500 M03
G01 Z-10.0 F150
G00 Z100.0
G49
M30
%
🛠️ How Tool Probes Help
Using a tool presetter or spindle probe allows automatic, highly accurate offset measurement. Once probed, offsets are stored in the controller’s table for each tool number.
📌 Final Thoughts
Tool length compensation is essential for safe, accurate CNC milling. Always:
- Use
G43 Hxxbefore cutting - Double-check offset values
- Cancel with
G49when done
Tool length is not just a number — it’s the difference between perfection and a broken part.
Leave a comment