G-code reference
G45 G-Code: Tool Position Offset (Increase)
Tool Position Offset (Increase) — Old Fanuc offset function: lengthens the programmed move by the offset value (G45 increase, G46 decrease, G47 double increase, G48 double decrease)…
| Property | Value |
|---|---|
| Code | G45 |
| Function | Tool Position Offset (Increase) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Milling machines |
| Syntax | G45 X_ D_ |
What does G45 do?
Old Fanuc offset function: lengthens the programmed move by the offset value (G45 increase, G46 decrease, G47 double increase, G48 double decrease). Superseded by G41/G42 cutter compensation.
G45 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
G45 X_ D_| Address | Meaning |
|---|---|
D | Offset number |
G45 example program
G91 G45 G00 X20.0 D01▶ Open this example in the G-code viewer
Tips and common mistakes
- Do not mix with G41/G42.
Controller compatibility
G45 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.