CNC G41 & G42 Cutter Compensation: Tool Radius Offsets Explained
If you want your tool to follow an exact contour on the part, tool radius compensation is essential. That’s where G41 and G42 come in — allowing the CNC controller to offset the programmed path based on the tool’s size.
🔄 What Are G41 and G42?
| G-Code | Compensation | Tool Offset Direction |
|---|---|---|
| G41 | Left | Cutter left of path (CCW) |
| G42 | Right | Cutter right of path (CW) |
G41= Compensate to the left of the programmed pathG42= Compensate to the right of the programmed path
🛠️ When to Use Cutter Compensation?
- When using multiple tools with different diameters
- To adjust for tool wear without changing G-code
- When programming profiles or 2D contours
📍 G41/G42 in a Real Program
T1 M06 ; Select tool
G90 G00 X0 Y0 ; Rapid to start
G43 Z5 H01 ; Tool length comp
G01 Z-1 F100 ; Feed into material
G41 D01 ; Cutter comp left, using tool radius in D01
G01 X50 Y0 ; Start profiling
...
G40 ; Cancel cutter comp
G00 Z100 ; Retract
D01points to the tool radius stored in your tool tableG40must be used to cancel compensation before retract
🔍 How Does the Controller Know the Tool Size?
The tool radius value is stored in the tool offset table. D01 refers to Tool #1’s radius.
| Tool | D Code | Radius (mm) |
|---|---|---|
| T1 | D01 | 3.0 |
| T2 | D02 | 5.0 |
🔁 G40: Cancel Compensation
Never forget to cancel the cutter comp with G40, or your toolpath will behave unpredictably.
G40 ; Cancel cutter comp before retract
⚠️ Common Mistakes
- Not using
G40before retract - Forgetting to use
Dnumber withG41/G42 - Placing
G41/G42on a move with no lead-in - Using wrong side compensation (left/right)
✅ Best Practices
- Always add a lead-in move before
G41orG42 - Use
G40on lead-out or retract move - Keep your tool table updated
- Simulate programs to confirm offset direction
📉 Lead-in/Lead-out Example
G00 X10 Y0
G01 Z-2 F100
G41 D01
G01 X20 Y0 (lead-in move with compensation)
...
G40
G01 X30 Y0 (lead-out move)
This avoids gouging or sudden shifts during compensation.
🧠 Pro Tip
If you’re using CAM software, it may already insert G41/G42 — but double-check if it’s outputting wear compensation or full radius.
🧪 Simulation Helps
Before running on an actual part:
- Use tools like NC Viewer, CAMotics, or your CNC’s internal backplot
- Visualize toolpath changes with and without
G41/G42
🔁 Summary Table
| G-Code | Function | Use Case |
|---|---|---|
| G40 | Cancel comp | After profile cut |
| G41 | Comp left | Outside contour |
| G42 | Comp right | Inside pocket |
🎯 Final Tip
When used correctly, G41 and G42 give you flexibility to:
- Change tool size
- Adjust for wear
- Run precision jobs with minimal code edits
Never trust cutter comp blindly — simulate and verify!
Leave a comment