CNC mill · G-code
G40: cutter compensation cancel
G40 turns off G41 or G42 cutter radius compensation. Haas lists it in modal group 07. Formats below from Haas, LinuxCNC and Fanuc, each from its maker.
Worked example
Lead off the part in a straight line. Written for this page in the Haas format.
G01 X2. Y0 (last compensated move)G40 G01 X2.6 (comp off on a straight move longer than the tool diameter)G00 Z1.How each control writes it
Haas G40
One source: Haas Automation, the control's maker
- G40 cancels G41 or G42 cutter compensation.
Source: Haas Automation, mill G40
LinuxCNC G40
One source: the LinuxCNC project, the control's maker
- The next move must be a straight line longer than the tool diameter; an arc right after G40 is an error.
- G40 when compensation is already off is fine.
Source: LinuxCNC documentation, "G40 Compensation Off" (archived Oct 29, 2026)
Fanuc G40 IP_ ;
One source: FANUC, the control's maker
- IP
- The move on which compensation is cancelled (optional)
- FANUC 0i-MF (machining centre), from its operator’s manual. On another FANUC model, check that control’s manual.
- An offset number of D0 also cancels it.
Source: FANUC B-64604EN-2/01, Operator's Manual, 0i-MF (machining centre), §6.5
How the controls differ
- Only Fanuc takes IP.
- A word two controls share can still mean different things: read each control's list above.
Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.