Post Processor Engineering

How Tool Length Compensation Works in CNC Post Processors

Every tool sticks out a different distance from the spindle. Tool length compensation tells the controller how long each tool is, and the post must activate it correctly every time.

The concept

Tool lengths are measured (on a presetter or on the machine) and stored in the controller's offset table. When compensation is active, the controller shifts Z by the stored length so programmed Z values refer to the tool tip, not the spindle gauge line.

How controllers activate it

ControllerActivationCancel
FANUC / Haas / MitsubishiG43 H5 Z50.G49 (or with retract)
SINUMERIKT5 M6 then D1D0
HeidenhainTOOL CALL 5 Z (length from tool table)Next tool call
Okuma OSPG56 H5 Z50.G49

Safe activation

T5 M06
G00 G90 G54 X20. Y10. S8000 M03
G43 H05 Z50. M08     (Z move in the same block as G43)
G00 Z5.
G01 Z-2. F400.

Activating G43 with a Z move to a safe height is standard practice: the first Z move after compensation is the one where a wrong length is most dangerous.

H-number mapping

  • Most shops use H = tool number (T5 → H5), which the post enforces.
  • Some use separate length offset numbers from the CAM tool library.
  • Sister tools and tool life management may use different offset numbers.

Common mistakes

  • Wrong H value after a tool renumbering.
  • Compensation not reactivated after a G28 or tool change.
  • G49 cancelling at the wrong moment, causing a sudden Z move.
  • CAM tool length not matching the real tool, making simulation unreliable.
Tool length errors are among the most common causes of crashes. The post should make them nearly impossible.

Safe tool length handling

See our CNC post processor development service and G43, G43.4 and TCP explained.

EM
ENGIMANDI CNC Team

We develop, customise and commission CNC post processors for Fusion, NX CAM, Mastercam, SolidCAM and other CAM systems.