Back to Supported G-Codes

G28 - Move to Origin (Home)

DMC File Mode: Supported
Streaming Mode: Supported

Description

The G28 command moves specified axes to their origin (home) position. This is a fundamental command for establishing a known reference point for the machine's coordinate system. When executed, the command will move the specified axes to their home position as defined by the machine's configuration.

This command is essential for machine initialization, calibration procedures, and ensuring accurate positioning throughout machining operations. It provides a reliable way to return to a known mechanical reference point.

Syntax

G28 [X] [Y] [Z]

Parameters

ParameterDescriptionExample
XHome the X-axis (optional)G28 X
YHome the Y-axis (optional)G28 Y
ZHome the Z-axis (optional)G28 Z

Note: If no axes are specified all axes will be homed.

Examples

Home All Axes

Home all three axes simultaneously. This is commonly used during machine startup or when a complete reference is needed.

G28

Home Individual Axis

Home only the Z-axis. This is useful when you need to establish the Z-height reference without disturbing X and Y positions.

G28 Z

Home X and Y Only

Home the X and Y axes while leaving the Z-axis in its current position. Often used when the tool height is already set correctly.

G28 X Y

Typical Machine Startup Sequence

A common initialization sequence that homes all axes and sets absolute positioning mode.

G21 ; Set units to millimeters
G90 ; Set absolute positioning
G28 ; Home all axes
G1 F1500 ; Set default feedrate