Home › G-codes › Mach3 Mach4 › G28.1
G28.1 Reference axes, Mach3
Mach3 Mach4 G-code · Mill
Mach3. Homes the named axes onto their home switches at the current feed rate, as set up in the homing config. It sets machine zero.
Format
G28.1 [X] [Y] [Z] [A]
Addresses
| Address | What it does |
|---|---|
X Y Z A | Axes to reference, value is the machine position where it slows to the homing speed |
How it works
Non modal.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
G0 G53 Z0 (Z UP FIRST)
G28.1 Z0 (REFERENCE Z)
G28.1 X0 Y0 (REFERENCE X AND Y)
…
G0 G53 Z0 (Z UP FIRST)
G28.1 Z0 (REFERENCE Z)
G28.1 X0 Y0 (REFERENCE X AND Y)
…
The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Needs working home switches. With none, the axis keeps moving until you press E stop.
- Mach4 does not list G28.1. Home from the Ref All button or the homing setup.
Related codes
G28.1 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| LinuxCNC Tormach | Store position 1 |
| Fadal | Return from jog away |
Every G-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G28.1 in the app All Mach3 Mach4 G-codes