G30: Return to second reference position
What G30 does
G30 works like G28 but goes to a second reference position stored in a parameter. Machines often use it as a tool change or part loading position.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Non-modal |
| Modal | No: acts only on its own line |
G30 example
G91 G30 Z0. Go to the second reference position in Z.
| Word | What it means here |
|---|---|
G91 | Incremental positioning |
G30 | Return to second reference position |
Z0. | Z axis target or depth |
Codes people confuse with G30
| Code | What it does instead |
|---|---|
G28 | Return to reference position. Sends the named axes home, by way of an intermediate point. |
Other codes in the non-modal group
These also act only on their own line.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G30
-
What does
G30do? (Mill and lathe) -
Which code: Like G28, but to a second stored position, often the tool-change point.(Mill and lathe)
-
What does
G28do? (Mill and lathe)
Show the answers
- Like G28, but to a second stored position, often the tool-change point.
- G30
- Sends the named axes home, by way of an intermediate point.
Frequently asked questions
- What does G30 mean in CNC programming?
- Return to second reference position. Like G28, but to a second stored position, often the tool-change point.
- Is G30 modal?
- No. G30 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
- What is the difference between G30 and G28?
- G30 (return to second reference position): like G28, but to a second stored position, often the tool-change point. G28 (return to reference position): sends the named axes home, by way of an intermediate point.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.