# LinuxCNC G43

Instructions · `G43` · verification: source checked

G43 is a LinuxCNC G-code that enables tool length compensation. It offsets subsequent axis coordinates by the stored tool length and does not cause motion; the next compensated axis move uses the compensated endpoint. G43 without H uses the currently loaded tool from the last Tn M6, while G43 Hn uses the offset for tool n.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | G43 |
| Group | Tool Length Offset |
| Syntax | G43 <H-> |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| H | tool number (optional) |

## Connected

- Related: [LinuxCNC M61](https://machineschema.com/instruction/mcode-m61.md)

## Study notes

- G43 does not cause any motion.
- The tool length compensation values applied to motion are stored in numbered parameters 5081-5089.
- Parameters 5401-5409 hold the loaded tool's stored offset and are refreshed on tool change (M6) and G10 L1/L10/L11.
- G43 H0 behavior differs by tool changer: on nonrandom changers it applies the current spindle tool's TLO or 0 if no tool is loaded; on random changers it applies T0 from the tool table or errors if T0 is undefined.
- It is an error if the H number is not an integer, is negative, or is not a valid tool number; 0 is a valid tool number on nonrandom tool changer machines.

## Sources

1. [G-Codes](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g43) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/gcode-g43  
JSON: https://machineschema.com/instruction/gcode-g43.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
