CNC Machinist Calculator Ultra

Home › G-codes › Haas NGC › G28

G28 Return to machine zero

Haas NGC G-code · Mill, Lathe

On mills: Return to machine zero

Sends the named axes to machine zero, through an intermediate point if axis values are given. The common safe use is G91 G28 Z0. to send Z home straight up.

Format

G28 [X Y Z A B]

Addresses

AddressWhat it does
X Y Z A BAxes to send home. The values are an intermediate point in the current mode

How it works

Non-modal, group 00.

Example program

M09 (COOLANT OFF)
G91 G28 Z0. (Z HOME STRAIGHT UP)
G28 Y0. (Y HOME TO BRING THE TABLE FORWARD)
G90 (BACK TO ABSOLUTE)
…

The full 5-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

On lathes: Return to machine zero

Sends axes to machine zero. With no axis words all axes go home. With axis words the tool first moves to that point, which is saved as the G29 reference point.

Format

G28 [U0] [W0] [X] [Z]

Addresses

AddressWhat it does
U0 W0Go straight home on X or Z with no intermediate move
X ZIntermediate point in the current work offset before going home

How it works

Non-modal, group 00.

Example program

G00 X2.5 Z.1 (CLEAR OF PART)
G28 U0 (X HOME DIRECTLY)
G28 W0 (Z HOME DIRECTLY)
M30 (END PROGRAM)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G29 · G53 · G91

G28 on other controls

The same number can mean something different on another control.

ControlMeaning
FanucReturn to reference position
Mazak (EIA)Reference point return
Mitsubishi M70 M80Return to reference position
Brother SpeedioReturn to reference point
Heidenhain TNC (ISO)Mirror image
LinuxCNC TormachGo to stored position 1
Mach3 Mach4Return to home through a point
Centroid CNC12 AcornReturn to reference point 1
Hurco WinMax (NC)Return to reference point
FadalReturn to zero
Swiss (Citizen Star)Return to reference point

Every G-code for Haas NGC 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 Haas NGC G-codes

App Store Google Play