# LinuxCNC G30

Instructions · `G30` · verification: source checked

G30 is a LinuxCNC G-code that makes a rapid move from the current position to a predefined absolute position stored in parameters 5181-5189. Optionally, axis words given with G30 first move those axes to the programmed point (including offsets), then the specified axes rapid to the stored position; axes not named do not move. It functions like G28 but uses the second set of stored parameters.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | G30 |
| Group | Go/Set Predefined Position |
| Syntax | G30 axes |
| Dialect | LinuxCNC |

### Parameters

| Name | Description |
|---|---|
| axes | Optional axis words (X Y Z A B C U V W). The axes move rapidly to the given position including any offsets, then rapidly to the absolute position stored in parameters 5181-5189. Any axis not specified will not move. |

## Safety

- Only use G30 when the machine is homed to a repeatable position and the desired G30 position has been stored with G30.1.
- It is an error if cutter compensation is turned on.

## Study notes

- The final point is taken from parameters 5181-5189; the values are absolute machine coordinates in the native machine units specified in the INI file.
- All axes defined in the INI file are moved when a G30 is issued.
- If no positions are stored with G30.1, all axes go to the machine origin.
- G30.1 stores the current absolute position into parameters 5181-5186.
- G30 parameters are used to move the tool when an M6 is programmed if TOOL_CHANGE_AT_G30=1 is set in the [EMCIO] section of the INI file.
- Example line: G30 Z2.5 (rapid to Z2.5 then to the Z location specified in #5183).

## Sources

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

---

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