G40, G41, G42: Cutter Compensation

Last modified by writer on 2023/09/07 15:16

G40 – turn cutter compensation off.

The command to disable compensation for tool diameter should be followed by linear movement with a value greater than the tool diameter. Duplication of the command cannot cause a control program error.

It is an error if:
  • the code is followed by a circular movement (G2/G3);
  • linear displacement (G0/G1) after switching off the compensation is less than the diameter of the tool.

G41 – enable compensation mode to the left of the programmed path.
G42 – enable compensation mode to the right of the programmed path.

G41/G42 are set after tool change macro whose value is the tool number from the corresponding table. When a command is called, the control program changes the path, moving it to the right (G42) or to the left (G41) from the original one.

G41 example:
M6 T26 (command tool change to tool No. 26)
G0 X-10 Y-10 Z0 (rapig linear interpolation)
G41 (enable compensation on the left)
G0 X0 Y0 (fast linear movement)
G1 Z0 (feed linear interpolation)
G1 Y50
G1 X50 Y0
G1 X0
G40 (off compensation mode)
G0 X-10 Y-10
It is an error if:
  • if the YZ work plane is active (more...);
  • the current tool is not selected or the diameter of the selected tool is not specified;
  • tool diameter compensation has been included previously.