CNC Machinist Calculator Ultra

Home › G-codes › Mach3 Mach4 › G30

G30 Return to second home

Mach3 Mach4 G-code · Mill

Like G28 but ends at a second home point, often a tool change or load spot. Mach3 uses parameters 5181 to 5186. Mach4 adds P2, P3 or P4.

Format

G30 [P] [X] [Y] [Z]

Addresses

AddressWhat it does
PMach4 only, P2 to P4 picks the return point, default P2
X Y ZIntermediate point for the axes to send

How it works

Non modal.

Example program

G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
S5000 M3 (SPINDLE ON)
G43 H1 Z1.0 (LENGTH OFFSET)
…

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

Watch out for

Related codes

G28 · G53

G30 on other controls

The same number can mean something different on another control.

ControlMeaning
FanucReturn to 2nd, 3rd or 4th reference position
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
Centroid CNC12 AcornReturn to reference point 2

Every G-code for Mach3 Mach4 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 Mach3 Mach4 G-codes

App Store Google Play