This crash report is a classic for a reason: the program said G28 Z0, the operator read “go home in Z,” and the turret instead drove toward the chuck before heading home. Nothing malfunctioned. G28’s actual contract was just sharper than the folklore version, and the difference is the whole lesson.
G28’s real contract: via, then home
G28 means return to the machine’s reference position through an intermediate point, and the axis words on the line define that waypoint, not the destination, interpreted in the current coordinate mode and active offset like any other coordinates. The general G28 introduction covers the friendly version; the crash version is one substitution away: under G90 with G54-style work offsets active on a lathe, Z0 is the workpiece zero, typically the part face, so G28 Z0 commands “move to the part face (or wherever workpiece Z0 sits, possibly inside chuck territory), then go to reference.” The machine obeyed; the waypoint was the accident.
The one-line autopsy
| Spelling | Mode | What the machine does |
|---|---|---|
| G28 Z0 | G90, offset active | To workpiece Z0 first: the dive |
| G91 G28 Z0 | G91 | Zero-length waypoint: straight home from here |
| G28 U0 W0 | Lathe incremental words | Same idea, system-A spelling |
| G53 Z(safe) | Machine coords, per dialect | Direct machine-coordinate move, no waypoint |
| G30 (with sane stored point) | Either | Return via the stored second reference |
The second and third rows are the traditional fix: an incremental zero waypoint means “the intermediate point is right here,” collapsing the via-move to nothing, after which the axis goes home. The discipline attached: restore G90 immediately after, because that G91 left active is its own classic crash, which makes the pair a fixed idiom: G91 G28 Z0 then G90, typed together or not at all.
Why Z-only first is also part of the idiom
Production endings home Z before X (G91 G28 Z0, then G28 X0 or U0) so the tool retracts away from the work before any cross travel: a combined one-line G28 with both axes moves them together toward the waypoint, and diagonal paths near chucks and tailstocks are how the interrupted-geometry crashes happen. Sequence the retreat: up and out first, across second, the same instinct as every rapid-height habit on this site.
The modern alternatives, honestly weighed
Many shops have moved end-of-program retreats from G28 idioms to explicit machine-coordinate moves (G53 Z with a known-safe value, where the dialect supports it as a one-shot machine-coordinate move) precisely because there is no waypoint to misread, or to G30 where the second reference point is deliberately stored somewhere tool-change-friendly: both choices live in your machine’s documentation, including how G53 interacts with tool compensation on your control. The honest comparison: G91 G28 Z0 is portable folklore-proofed tradition; G53 is explicit and waypoint-free where available; either beats an unexamined G90 G28 Z0 in someone else’s inherited program, which is exactly the line a five-pass read flags before it runs.
The checklist when you meet G28 in the wild
Four questions per occurrence, ten seconds total: what coordinate mode is active at this line (scan up for G90/G91 state); what do these axis words mean as a waypoint under that mode and the active offset; is the sequencing safe (Z clear before cross moves); and is G90 restored after any G91 idiom. Inherited programs, looped production enders, and MDI-typed homes during setup are where the questions earn their keep, and MDI deserves extra respect: a typed G28 inherits whatever mode the last program left, the exact ambush this article exists to retire.
Bottom line: the waypoint was the crash
G28 goes home via the point you name, in the mode that happens to be active: under G90 with offsets, G28 Z0 visits workpiece zero first, and on a lathe that visit can end in the chuck. Spell retreats as the fixed idiom (G91 G28 Z0, restore G90, Z before X) or as explicit machine-coordinate moves per your dialect, interrogate every inherited G28 with the four questions, and the dive becomes a story you explain rather than repeat. The state-tracking that makes those questions fast stays free to train: 60-second drills on the G-code practice page, with G-Code Sprint repeating what you miss.
Sources
Frequently asked questions
Why did my Z axis dive toward the chuck on G28?
Because G28’s axis words are an intermediate waypoint interpreted in the active mode: under G90 with a work offset, G28 Z0 means “go to workpiece Z0 first, then home,” and workpiece Z0 on a lathe is the part-face region. The machine followed the contract; the spelling was the hazard. For the modal-state fluency that catches this on sight, the free G-Code Sprint app is the top pick: 60-second drills with automatic repetition of missed codes.
What is the safe way to send an axis home with G28?
The fixed idiom: G91 G28 Z0 (zero-length waypoint: straight home from here), restore G90 immediately, and home Z before any cross axes. Lathe system-A spelling uses U0/W0 for the same zero-waypoint idea. Alternatively use explicit machine-coordinate moves (G53) or G30 per your machine’s documentation.
Is G53 better than G28 for end-of-program retreats?
Where the dialect supports it as a one-shot machine-coordinate move, G53 with a known-safe value has no waypoint to misread, which many shops prefer for clarity. G91 G28 Z0 remains the portable tradition. Either is sound; an unexamined G90-mode G28 with offsets active is the only wrong answer.
Why does everyone write G91 G28 Z0 G90 as one unit?
Because each piece guards the others: G91 makes the waypoint zero-length, G28 goes home, and the immediate G90 prevents the incremental mode from ambushing the next coordinate line, a crash class of its own. Idioms survive because their pieces are load-bearing.
G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.