G40, G41, G42: Cutter Radius Compensation – Accurate Profiling Made Easy
In CNC machining, tool diameter (or radius) can affect how close your toolpath actually follows the intended profile. Cutter Radius Compensation (CRC) lets you program paths at the part’s edge, and the controller offsets the motion based on tool size.
This is controlled by three G-codes:
| G-Code | Mode | Direction of Compensation |
|---|---|---|
| G40 | Cancel CRC | No compensation |
| G41 | Tool Left of Path | Left side of motion |
| G42 | Tool Right of Path | Right side of motion |
🧠 Why Use CRC?
Without CRC, you’d need to manually offset your toolpath by the tool radius in CAD/CAM — a tedious and error-prone process. With CRC:
- The toolpath matches part geometry exactly
- Tool wear can be compensated at the controller
- You can swap tools without reprogramming G-code
🎯 How It Works
You activate CRC before a contour, move into the profile, and deactivate it after.
🔸 G41 – Tool Left of Path
G1 X10 Y10
G41 D01 ; Apply left compensation using offset D01
G1 X50 Y10
G1 X50 Y50
G40 ; Cancel compensation
🔹 G42 – Tool Right of Path
G1 X10 Y10
G42 D01 ; Apply right compensation using offset D01
G1 X50 Y10
G1 X50 Y50
G40
D01corresponds to the tool offset number in the controller (i.e., Tool Radius in Offset Table)
📏 Entry/Exit Moves Matter
You must provide a lead-in move before applying G41/G42 and a lead-out before G40. Otherwise, the controller may:
- Error out
- Miscalculate the compensation
- Gouge the part
✅ Good Entry Example
G0 X0 Y0
G1 X5 Y0 ; Lead-in move
G41 D1
G1 X50 Y0 ; Start profile
❌ Bad Entry Example
G0 X0 Y0
G41 D1
G1 X50 Y0 ; No space to compensate
🔧 Setting Up the Tool Offset Table
Most controllers (Fanuc-style) use the D-code to reference the tool radius in the offset table:
| D Number | Tool Radius (mm) |
|---|---|
| D01 | 3.175 |
| D02 | 6.0 |
When you program:
G41 D01
…it uses the radius from D01 (3.175 mm) to shift the path accordingly.
⚠️ Common Issues
| Issue | Cause | Fix |
|---|---|---|
| Alarm on G41/G42 | No lead-in move | Add approach move before applying CRC |
| Tool gouges corner | Too short lead-in/out | Extend approach and retract moves |
| CRC not applied correctly | Wrong D-code or offset value | Check tool table and D number |
| Direction reversed | G41 vs G42 swapped | Verify tool movement direction |
🧪 Complete Example: Profile with G41
%
O5001 (CRC Profile Example)
G21 G90 G17
T1 M6
G0 X0 Y0
G43 H1 Z100
S1200 M3
G0 Z5
G1 Z-5 F200
G1 X5 Y0 ; Approach
G41 D1
G1 X50 Y0
G1 X50 Y50
G1 X0 Y50
G1 X0 Y0
G40 ; Cancel CRC
G1 X-5 Y0 ; Retract
G1 Z100
M30
%
🧩 CRC in CAM Software
Most CAM systems offer cutter compensation in three ways:
| Mode | Control | Use Case |
|---|---|---|
| Off | CAM | Path is offset already |
| Computer | CAM | Path is offset and CRC turned off |
| Control | Controller (G41/G42) | Ideal for wear/offset adjustment |
- Set Control compensation for manual fine-tuning on the machine
- Post-processor must output G41/G42 and D-codes
📊 Summary Table
| G-Code | Function | Tool Position |
|---|---|---|
| G40 | Cancel Compensation | Directly on path |
| G41 | Left of programmed path | CCW around contour |
| G42 | Right of programmed path | CW around contour |
🔚 Final Thoughts
Cutter Radius Compensation is an advanced but essential feature of CNC programming. It allows for flexibility, accuracy, and real-time correction — especially useful in tight tolerance environments or multi-tool jobs.
Let the controller do the math — you focus on perfecting the path.
Leave a comment