G-code reference
G30.1 G-Code: Set Second Predefined Position (GRBL / LinuxCNC)
Set Second Predefined Position (GRBL / LinuxCNC) — Stores the current machine position as the G30 position on GRBL and LinuxCNC, often used for a tool-change or probe location.
| Property | Value |
|---|---|
| Code | G30.1 |
| Function | Set Second Predefined Position (GRBL / LinuxCNC) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Milling machines |
| Syntax | G30.1 |
What does G30.1 do?
Stores the current machine position as the G30 position on GRBL and LinuxCNC, often used for a tool-change or probe location.
G30.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
G30.1G30.1 example program
G30.1
(later)
G30▶ Open this example in the G-code viewer
Controller compatibility
G30.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.