G-code reference
G28.1 G-Code: Set Predefined Position (GRBL / LinuxCNC)
Set Predefined Position (GRBL / LinuxCNC) — On GRBL and LinuxCNC, stores the current machine position as the G28 position. A later G28 moves there (through an optional intermediate point). Handy as a…
| Property | Value |
|---|---|
| Code | G28.1 |
| Function | Set Predefined Position (GRBL / LinuxCNC) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Milling machines |
| Syntax | G28.1 |
What does G28.1 do?
On GRBL and LinuxCNC, stores the current machine position as the G28 position. A later G28 moves there (through an optional intermediate point). Handy as a safe tool-change or park position on routers.
G28.1 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
G28.1G28.1 example program
(jog to park position, then)
G28.1
(later in a program)
G28 G91 Z0
G90▶ Open this example in the G-code viewer
Tips and common mistakes
- Not used on Fanuc, where the G28 position is machine zero.
Controller compatibility
G28.1 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
- G28 — Return to Reference Point (Machine Home)
- G30.1 — Set Second Predefined Position (GRBL / LinuxCNC)