Home › G-codes › Mazak (EIA) › G28
G28 Reference point return / Reference point return, lathe
Mazak (EIA) G-code · Mill, Lathe
On mills: Reference point return
Returns the axes to the machine reference point, through an intermediate point. Most programs use G91 G28 Z0 so Z goes straight up from where it is.
Format
G28 X Y Z
Addresses
| Address | What it does |
|---|---|
X Y Z | Intermediate point the axes pass through. In G91 a value of 0 means no extra move |
How it works
Non-modal.
Example program
G00 Z1. M09 (RETRACT, COOLANT OFF)
G91 G28 Z0. (Z HOME, NO INTERMEDIATE MOVE)
G28 X0. Y0. (X Y HOME)
G90 (BACK TO ABSOLUTE)
G91 G28 Z0. (Z HOME, NO INTERMEDIATE MOVE)
G28 X0. Y0. (X Y HOME)
G90 (BACK TO ABSOLUTE)
Example is in inch. Check offsets and clearances first.
Watch out for
- G90 G28 Z0 goes through work Z zero first, which can drive the tool into the part. Use G91 G28 Z0.
- Cancel G68 or G68.2 before G28 or the move can overtravel.
On lathes: Reference point return, lathe
Returns the turret to the machine reference point. G28 U0 W0 goes home straight from where it is.
Format
G28 U W
Addresses
| Address | What it does |
|---|---|
U W | Incremental intermediate point, 0 means no extra move |
How it works
Non-modal.
Example program
G00 X3. Z.5 M09 (CLEAR THE PART)
G28 U0. (X HOME)
G28 W0. (Z HOME)
M30 (END)
G28 U0. (X HOME)
G28 W0. (Z HOME)
M30 (END)
Example is in inch. Check offsets and clearances first.
Watch out for
- Use U and W with 0. G28 X0 sends the tool through the center line first.
- Send X home before Z to clear the tailstock or part.
Related codes
G28 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Return to reference position |
| Haas NGC | Return to machine zero |
| Mitsubishi M70 M80 | Return to reference position |
| Brother Speedio | Return to reference point |
| Heidenhain TNC (ISO) | Mirror image |
| LinuxCNC Tormach | Go to stored position 1 |
| Mach3 Mach4 | Return to home through a point |
| Centroid CNC12 Acorn | Return to reference point 1 |
| Hurco WinMax (NC) | Return to reference point |
| Fadal | Return to zero |
| Swiss (Citizen Star) | Return to reference point |
Every G-code for Mazak (EIA) 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 in the app All Mazak G-codes