CNC Machinist Calculator Ultra

Home › G-codes › Fanuc › G30

G30 Return to 2nd, 3rd or 4th reference position

Fanuc G-code · Mill, Lathe

On mills: Return to 2nd, 3rd or 4th reference position

Like G28 but goes to the second, third or fourth reference position set in parameters. Often used as the tool change position or a part unload spot.

Format

G30 [P2 P3 P4] X Y Z

Addresses

AddressWhat it does
PP2, P3 or P4 picks the reference position. P2 if left out
X Y ZIntermediate point, only named axes move

How it works

One shot, group 00.

Example program

G00 Z1. M09 (CLEAR PART)
G91 G30 Z0. M05 (Z TO TOOL CHANGE POSITION)
G90 (ABSOLUTE)
T4 M06 (TOOL CHANGE)

Example is in inch. Check offsets and clearances first.

Watch out for

On lathes: Return to 2nd, 3rd or 4th reference position

Rapids through an intermediate point to a second, third or fourth reference position, often a safe tool change point set by parameter.

Format

G30 [P2] X(U) Z(W)

Addresses

AddressWhat it does
PReference position number 2, 3 or 4. P2 if left out
U WIntermediate point, incremental. U0 W0 means no detour

How it works

Non-modal.

Example program

G00 X3. M09 (CLEAR PART)
G30 U0 W0 (TO TOOL CHANGE POSITION)
T0202 (NEXT TOOL)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G28 · G29 · G27

G30 on other controls

The same number can mean something different on another control.

ControlMeaning
Mazak (EIA)Second, third or fourth reference point
Okuma OSPPositioning to home position
Mitsubishi M70 M80Second to fourth reference return
Brother SpeedioSecond reference point return
Heidenhain TNC (ISO)Blank form min point
LinuxCNC TormachGo to stored position 2
Mach3 Mach4Return to second home
Centroid CNC12 AcornReturn to reference point 2

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 G30 in the app All Fanuc G-codes

App Store Google Play