G28 sends the machine axes back to their home (reference) position, usually by way of an intermediate point you specify. It is the standard safe move before a tool change or at the end of a job.
Format
G91 G28 Z0 (home Z only, incremental)
How it works
- The axes first move to the intermediate point, then continue to machine home.
- Pairing with G91 (incremental) and Z0 homes the Z axis straight up with no sideways move.
- Always retract Z to a safe height before homing X and Y.
Example
G28 X0 Y0 (home X and Y)
G90 (back to absolute)
Related: work offsets and the G-Code Cheat Sheet.
