G43, G44, and G49 Explained: Tool Length Compensation in CNC Programming
In professional CNC programming, tool length compensation (TLC) is a critical feature that ensures each tool cuts to the correct Z-depth, regardless of its physical length.
G43, G44, and G49 are the primary G-codes used to apply, reverse, or cancel tool length compensation — especially important during tool changes and multi-tool operations.
🔍 Why Tool Length Compensation Is Needed
Each tool in a CNC machine has a different length. Without compensation:
- Z-axis cuts would be inaccurate
- Parts may be scrapped
- Collisions with fixtures can occur
TLC allows the machine controller to adjust Z-position based on pre-measured tool offsets stored in the machine’s tool table.
🧠 Key G-Codes for Tool Length Compensation
🔹 G43 – Apply Tool Length Compensation (+ direction)
G43 H01 Z100
- Applies the length offset for Tool 1 (H01)
- Moves Z-axis to 100mm plus the tool offset
- Most commonly used TLC command
🔸 G44 – Apply Tool Length Compensation (− direction)
G44 H01 Z100
- Applies offset in the negative direction
- Rarely used; mostly for special tooling setups
🔹 G49 – Cancel Tool Length Compensation
G49
- Resets Z-axis TLC to zero
- Should be called before or after tool change
🧰 Understanding the H Word
The H parameter refers to a tool offset register in the CNC control system.
| Tool Number | Offset Register | Usage Example |
|---|---|---|
| T1 | H01 | G43 H01 Z100 |
| T5 | H05 | G43 H05 Z100 |
| T12 | H12 | G43 H12 Z100 |
- Tool offsets are defined in the machine’s offset table
- Always match
HtoTfor clarity and safety
📌 Example of Safe Tool Change with TLC
T2 M06 ; Select Tool 2
G0 G90 G54 X0 Y0 ; Move to start position
G43 H02 Z100 ; Apply tool offset for Tool 2
This ensures the Z-position is adjusted automatically based on the length of Tool 2.
🧪 Full Program Snippet with TLC
%
O1001 (Tool Length Compensation Example)
T1 M06 ; Select Tool 1
G0 G90 G54 X0 Y0 ; Absolute mode, position part zero
G43 H01 Z100 ; Apply length compensation for Tool 1
S1200 M03 ; Spindle on
G1 Z-10.0 F100 ; Feed to cutting depth
...
G0 Z100 ; Retract
G49 ; Cancel TLC
M05 M30 ; End program
%
⚠️ Safety Considerations
- Never skip
G43 Hxxafter tool change - Always cancel TLC with
G49before tool change (or reset) - Ensure offset values are correctly measured and entered in the controller
📊 G-Code Summary
| Code | Function | Notes |
|---|---|---|
| G43 | Apply TLC (+ direction) | Most common, safe for Z |
| G44 | Apply TLC (− direction) | Rare, inverse offset |
| G49 | Cancel TLC | Always use before tool change |
🧠 CAM vs Manual Programming
- CAM software often auto-generates
G43 HxxafterM06 - When writing code manually, you must handle TLC explicitly
- Proper TLC = safe setup, accurate parts, no Z crashes
✅ Best Practices
- Match
TandHnumbers (T3 = H03) - Use
G43 Hxx Z100to move safely into cutting zone - Cancel with
G49after tool is done - Simulate TLC-enabled programs before production
🔚 Final Thoughts
Tool length compensation is non-negotiable for precision machining and multi-tool setups. It ensures that every tool — short or long — cuts to the exact programmed depth, without manual recalculation or error risk.
Mastering G43, G44, and G49 gives you full Z-axis control and protects both your parts and your machine from costly crashes.
Leave a comment