G27 Reference position return check
Fanuc G-code · Mill, Lathe
On mills: Reference position return check
Moves the axes at rapid to the commanded point and checks that it is the machine reference position. If it is, the reference lamp lights. If not, an alarm stops the program.
Format
G27 X Y Z
Addresses
| Address | What it does |
|---|---|
X Y Z | Reference position, as a work coordinate value or with G91 as a distance |
How it works
One shot, group 00.
Example program
G49 G40 (CANCEL OFFSETS)
G91 G27 Z0. (CHECK Z IS AT REFERENCE)
G90 (BACK TO ABSOLUTE)
G91 G27 Z0. (CHECK Z IS AT REFERENCE)
G90 (BACK TO ABSOLUTE)
Example is in inch. Check offsets and clearances first.
Watch out for
- Cancel tool length and cutter compensation first, or the position includes the offset and the check fails.
- Rarely used today. G28 is the usual way to go home.
On lathes: Reference position return check
Moves to the given position and checks that it is the reference position. The lamp lights if it is, otherwise an alarm stops the program.
Format
G27 X(U) Z(W)
Addresses
| Address | What it does |
|---|---|
X Z | Reference position in absolute values |
U W | Incremental distance to the reference position |
How it works
Non-modal.
Example program
G00 X3. Z1. (CLEAR PART)
T0100 (TOOL OFFSET OFF)
G28 U0 W0 (HOME)
G27 U0 W0 (CHECK AT REFERENCE)
T0100 (TOOL OFFSET OFF)
G28 U0 W0 (HOME)
G27 U0 W0 (CHECK AT REFERENCE)
Example is in inch. Check offsets and clearances first.
Watch out for
- Cancel tool offset first or the check will fail by the offset amount.
- Rarely used today. G28 is the common return code.
Related codes
G27 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Mitsubishi M70 M80 | Reference position check |
| Brother Speedio | Reference point return check |
| Heidenhain TNC (ISO) | Tangential departure on an arc |
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 G27 in the app All Fanuc G-codes