G-code reference
G43 G-Code: Tool Length Compensation (+)
Tool Length Compensation (+) — Activates tool length offset by adding the value in H register to Z. The control can then position the tool tip correctly regardless of tool length.
| Property | Value |
|---|---|
| Code | G43 |
| Function | Tool Length Compensation (+) |
| Modal group | 08 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G43 H_ Z_ |
What does G43 do?
Activates tool length offset by adding the value in H register to Z. The control can then position the tool tip correctly regardless of tool length.
G43 is modal: once programmed it remains in effect for the following blocks until another code from modal group 08 replaces it or the control is reset.
Syntax and parameters
G43 H_ Z_| Address | Meaning |
|---|---|
H | Length offset register — normally equals the tool number |
Z | First Z position (applies the offset with the move) |
G43 example program
T5 M06
G90 G54 G00 X0 Y0 S8000 M03
G43 H05 Z50.0 M08▶ Open this example in the G-code viewer
Tips and common mistakes
- H must match the tool in the spindle — the #1 cause of Z crashes.
- Program G43 with a Z move so the offset is picked up safely above the part.
- Haas lets you set H to the tool number automatically (setting 15 warns on mismatch).
Controller compatibility
G43 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G44 — Tool Length Compensation (−)
- G49 — Tool Length Compensation Cancel
- G10 — Programmable Data Input (Set Offsets)