G-code reference
G36 G-Code: Automatic Tool Compensation X (Lathe)
Automatic Tool Compensation X (Lathe) — Fanuc lathe function (G-code system A) that moves the tool toward a tool-setter arm until the measuring position is reached, then automatically writes the X…
| Property | Value |
|---|---|
| Code | G36 |
| Function | Automatic Tool Compensation X (Lathe) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Lathes |
| Syntax | G36 X_ |
What does G36 do?
Fanuc lathe function (G-code system A) that moves the tool toward a tool-setter arm until the measuring position is reached, then automatically writes the X offset. G37 does the same in Z.
G36 is a one-shot code: it only acts in the block where it is written, and the previously active modal codes take over again afterwards.
Syntax and parameters
G36 X_| Address | Meaning |
|---|---|
X | Measuring position |
G36 example program
T0101
G36 X150.0▶ Open this example in the G-code viewer
Tips and common mistakes
- Requires the tool-setter arm (Q-setter) option and parameters.
Controller compatibility
G36 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.