Cutter compensation is one of the most important — and most misunderstood — features of CNC machining programs. It allows the same program to be used with tools of slightly different diameters, and it simplifies the programming of profiles that must be machined to exact dimensions.

The Problem Cutter Compensation Solves

When a CNC program specifies a tool path, it specifies the path of the tool centre — not the path of the cutting edge. The cutting edge is offset from the tool centre by the tool radius.

Without cutter compensation, the programmer must calculate the tool centre path manually — offsetting every point on the profile by the tool radius. This is time-consuming and error-prone. And if the tool is replaced with one of a slightly different diameter, the entire calculation must be redone.

With cutter compensation, the programmer specifies the profile path — the path the cutting edge should follow. The CNC controller offsets the tool centre path automatically by the tool radius stored in the tool table.

G41, G42, and G40

CodeNameEffect
G41Cutter compensation leftTool centre offset to the left of the programmed path (climb milling on external profiles)
G42Cutter compensation rightTool centre offset to the right of the programmed path (conventional milling on external profiles)
G40Cancel compensationReturn to programmed path — no offset

The direction (left or right) is relative to the direction of tool movement. For an external profile machined in a counter-clockwise direction, G41 produces climb milling.

Engagement and Cancellation

Cutter compensation must be engaged and cancelled on linear moves (G1), not arc moves (G2/G3). The engagement move must be long enough for the controller to calculate the offset correctly.

The correct sequence is:

  • Rapid to a position near the lead-in point (G0)
  • Engage compensation on a linear move to the lead-in point (G41/G42 Dn G1 X... Y...)
  • Machine the profile (G1, G2, G3 moves)
  • Cancel compensation on a linear move away from the profile (G40 G1 X... Y...)
  • Retract (G0)

How XyzPilot Handles Compensation

XyzPilot generates correct cutter compensation transitions automatically. The CAM module:

  • Selects G41 or G42 based on the machining direction and strategy
  • Generates the engagement move with the correct Dn tool offset number
  • Generates the cancellation move with explicit X and Y coordinates
  • Ensures cancellation occurs before the retract on every pass

You do not need to manage compensation manually. The system handles it correctly for every operation.

Common Mistakes

  • Engaging on an arc move — compensation must be engaged on a linear move
  • Cancelling without a full XY move — the cancellation move must specify both X and Y coordinates
  • Wrong direction — G41 vs G42 depends on the machining direction and strategy
  • Compensation active at program end — always cancel compensation before the program ends