LinuxCNC G40 Compensation Off

G40 is the LinuxCNC G-code that turns cutter compensation off. If cutter compensation was active, the next programmed move must be a linear move longer than the tool diameter. Programming G40 when compensation is already off is accepted.

Source checked3/3 values · 2026-10-26

Specification

1 source
Languagegcode
CodeG40
Groupcutter compensation
SyntaxG40
DialectLinuxCNC

Study notes

  • G40 cancels the cutter compensation started by G41 or G42.
  • After a G40 that ends an active compensation, the following move must be linear and longer than the tool diameter.
  • It is an error if a G2/G3 arc move is the next move after G40.
  • It is an error if the linear move after turning compensation off is less than the tool diameter.
  • The source example turns off compensation with G40 and then runs G0 X1.6, a linear move longer than the current cutter diameter.
↑↓ navigate↵ openesc close