CNC Machinist Calculator Ultra

Home › G-codes › Fanuc › G28

G28 Return to reference position

Fanuc G-code · Mill, Lathe

On mills: Return to reference position

Sends the axes at rapid through an intermediate point and then to the machine reference position, often called home. Used before tool changes and at the end of a program.

Format

G28 X Y Z

Addresses

AddressWhat it does
X Y ZIntermediate point the axes pass through first. Only named axes move

How it works

One shot, group 00. The intermediate point is remembered for G29.

Example program

G00 Z1. M09 (CLEAR PART, COOLANT OFF)
G91 G28 Z0. M05 (Z HOME, SPINDLE OFF)
G28 Y0. (Y HOME FOR PART UNLOAD)
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 reference position

Rapids to the reference position through an intermediate point. On a lathe G28 U0 W0 goes straight home from where the tool is.

Format

G28 X(U) Z(W)

Addresses

AddressWhat it does
X ZIntermediate point in absolute values
U WIntermediate point as an incremental distance. U0 W0 means no detour

How it works

Non-modal.

Example program

G00 X3. Z.5 M09 (CLEAR PART)
G28 U0 (X HOME)
G28 W0 (Z HOME)
M30 (END)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G29 · G30 · G27 · G91 · G53

G28 on other controls

The same number can mean something different on another control.

ControlMeaning
Haas NGCReturn to machine zero
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 Fanuc 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 Fanuc G-codes

App Store Google Play