G40: Cutter compensation cancel
What G40 does
G40 cancels G41 or G42 so the tool centre follows the programmed path again. Cancel it on a move away from the part, never while cutting, or the tool can step sideways into the finished wall.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Cutter compensation |
| Modal | Yes: stays active until replaced by another code from the same group |
G40 example
G40 G01 X-10. Y-10. Cancel compensation while leaving the part.
| Word | What it means here |
|---|---|
G40 | Cutter compensation cancel |
G01 | Linear interpolation (feed move) |
X-10. | X axis target (on a lathe, the diameter) |
Y-10. | Y axis target |
Codes people confuse with G40
| Code | What it does instead |
|---|---|
G49 | Tool length compensation cancel. Cancels G43 or G44. |
G41 | Cutter compensation left. Offsets the tool to the left of the path, looking in the direction of travel. |
Other codes in the cutter compensation group
Only one code from a modal group is active at a time. Programming any of these replaces G40.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G40
-
What does
G40do? (Mill and lathe) -
Which code: Turns off cutter radius (or tool nose) compensation.(Mill and lathe)
-
What does
G49do? (Mill)
Show the answers
- Turns off cutter radius (or tool nose) compensation.
- G40
- Cancels G43 or G44.
Frequently asked questions
- What does G40 mean in CNC programming?
- Cutter compensation cancel. Turns off cutter radius (or tool nose) compensation.
- Is G40 modal?
- Yes. G40 belongs to the cutter compensation group and stays active until another code from that group is programmed.
- What is the difference between G40 and G49?
- G40 (cutter compensation cancel): turns off cutter radius (or tool nose) compensation. G49 (tool length compensation cancel): cancels G43 or G44.
- What is the difference between G40 and G41?
- G40 (cutter compensation cancel): turns off cutter radius (or tool nose) compensation. G41 (cutter compensation left): offsets the tool to the left of the path, looking in the direction of travel.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.