Mastering G43 and G44: CNC Tool Length Compensation Demystified
Precision in vertical (Z-axis) depth is critical in CNC machining — and that’s where G43 and G44 step in. These commands enable tool length compensation, allowing the controller to automatically adjust for varying tool heights.
🔧 What Are G43 and G44?
| G-Code | Function | Tool Offset Direction |
|---|---|---|
| G43 | Positive Compensation | Tool appears longer |
| G44 | Negative Compensation | Tool appears shorter |
G43is used 95% of the time in real-world CNC programming.G44is rare and mainly used in special cases.
📐 Why Use Tool Length Compensation?
Without length comp, each tool change would require re-writing Z-values. Tool comp:
- Adjusts for different tool lengths
- Maintains consistent Z depths
- Enables quick tool changes with minimal code edits
- Compensates for tool wear or regrinding
⚙️ Tool Offset Table Example
| Tool | H Code | Length Offset (mm) |
|---|---|---|
| T1 | H01 | 120.35 |
| T2 | H02 | 115.80 |
Each tool has an offset stored in the control’s memory — usually entered manually or via tool setter.
📜 Sample G43 Program
T1 M06 ; Select Tool 1
G90 G00 X0 Y0 ; Absolute positioning
G43 Z5.0 H01 ; Apply tool length comp using H01
G01 Z-2.0 F100 ; Feed into part
...
G49 ; Cancel length comp
G00 Z100 ; Retract
Explanation:
G43 Z5.0 H01tells the machine to apply the offset stored in H01G49cancels the offset when you’re done
🔁 G44: When Would You Use It?
G44 tells the machine the tool is shorter than expected — rarely used. It requires careful setup and is mostly found in legacy programs or special vertical machines.
🧠 Understanding the Z Motion with G43
Assume:
- Z5.0 is your reference plane
- Tool length in H01 is 120mm
With G43 Z5.0 H01, the spindle moves to 125.0 machine Z to bring tool tip to Z5.0 part coordinate.
🧪 Simulation Shows the Difference
Without G43:
- Your tool will cut too deep or too shallow
With G43:
- Tool tip reaches exact Z depth, regardless of tool length
🔄 Cancel with G49
Always use G49 to cancel length comp before tool change or program end.
G49 ; Cancel tool length offset
✅ Best Practices
- Always use G43 with correct H number
- Use tool presetters to measure offsets precisely
- Apply compensation before Z motion
- Use
G49before tool change or M30
🧪 Quick Visual Reference
| G-Code | Action |
|---|---|
| G43 | Apply length comp (positive) |
| G44 | Apply length comp (negative) |
| G49 | Cancel length comp |
🧠 Bonus: What is G43.1?
G43.1 allows dynamic tool offset input in code:
G43.1 Z5.0 H=120.35 ; Apply 120.35mm offset directly
Useful for probing routines and macros.
🎯 Summary
G43is standard and applies a tool height correction from memory- Always match H number to the selected tool
- Use
G49to cancel after use - Never plunge Z before applying length comp
Leave a comment