G28 G-code Family

Standards comic

Overview

The G28 G-code family includes multiple related commands that handle homing and positioning. The exact meaning depends on:

  1. Machine type (3D printer vs CNC mill)
  2. GRBL mode setting - determines interpretation
  3. Specific subcommand (G28.0 through G28.7)

On a Reprap (3D printer), G28 means “seek the endstops and set position when found”.

On a CNC mill, G28 means “go to the recorded origin point for the machine”.

In Smoothieware, if you set to true, you get CNC behavior. Set it to false (default), you get Reprap behavior.

See grbl-mode for more information.

G28 Command Family Reference

Command Purpose Notes
G28 Home all axes (or specified axes) Seeks endstops in Reprap mode; goes to origin in GRBL mode
G28.1 Set/store park position Position stored in RAM; lost on reset; use M500 to persist
G28.2 (Not standard in V1) Typically same as G28
G28.3 Manual homing Set position without moving (useful for calibration)
G28.4 (Not applicable) Not implemented in V1
G28.5 Clear homed flags Clears the “machine is homed” state
G28.6 Show homing status Displays which axes are currently homed
G28.7 (Not applicable) Not implemented in V1
Command Purpose Notes
G28 Home all axes (or specified axes) Behavior depends on GRBL mode setting
G28.1 Set/store park position Position stored in RAM; lost on reset; use M500 to persist
G28.2 Conditional positioning In GRBL mode: home. In non-GRBL mode: go to stored park position (set by G28.1)
G28.3 Manual homing Set position without moving
G28.4 Manual homing by actuator V2 only: For rotary delta kinematics using actuator positions
G28.5 Clear homed flags Clears the “machine is homed” state
G28.6 Show homing status Displays which axes are currently homed
G28.7 Home slaved axis V2 only: For dual-motor axes (e.g., dual Z)

Detailed Command Descriptions

G28: Basic Homing/Origin Movement

Reprap mode (default): Seeks endstops for specified axes, stops when found, sets position to origin.

GRBL mode (when = true): Goes to the recorded machine origin.

Parameters: X, Y, Z to specify which axes to home (all if none specified).

Reprap mode (default): Seeks endstops for specified axes, stops when found, sets position to origin.

GRBL mode (when = true): Goes to the recorded machine origin.

Parameters: X, Y, Z to specify which axes to home (all if none specified).

For detailed information on Reprap-style homing, see G28-Reprap.

For detailed information on CNC-style origin movement, see G28-CNC.

G28.1: Store Park/Origin Position

See G28.1 for full details.

G28.2: Conditional Positioning (GRBL Mode Dependent)

In V1, G28.2 behavior depends on GRBL mode and is less clearly documented. Check your firmware build for specific behavior.

In V2, G28.2 has clear conditional behavior:

  • When = true (GRBL mode): Performs full homing sequence (seeks endstops)
  • When = false (Reprap mode): Goes to the park position previously stored by G28.1

This provides a unified way to either home to endstops or return to a stored safe position, depending on your machine configuration.

G28.3: Manual Homing (Position Override)

Sets the current position without moving the machine. Useful for calibration and soft-homing scenarios.

Example: Send G28.3 X0 Y0 Z0 to mark current position as origin without motion.

Both V1 and V2 support this command with the same behavior.

G28.4: Actuator-Based Manual Homing (V2 Only)

V2 Only - Rotary Delta Support

For rotary delta kinematics, G28.4 sets positions using actuator coordinates rather than cartesian coordinates.

Example: G28.4 A0 B120 C240 sets the three rotary actuators for a rotary delta to specific angles.

This command is not applicable in V1 as V1 firmware does not support rotary delta kinematics with actuator-level homing.

See the rotary-delta documentation for kinematics details and configuration.

G28.5: Clear Homed Flags

Clears the “machine is homed” state for all axes. Useful when you need to re-home or after manual axis movement. Supported in both V1 and V2.

G28.6: Show Homing Status

Displays which axes are currently marked as “homed” and their positions. Useful for debugging homing issues. Supported in both V1 and V2.

G28.7: Slaved Axis Homing (V2 Only)

V2 Only - Dual-Motor Axis Support

For machines with dual motors on a single axis (e.g., dual Z motors for large printers), G28.7 homes a “slaved” (secondary) axis.

Example: G28.7 Z homes the secondary Z motor independently.

Configuration requires setting up actuator slaving in the V2 config. See actuator-slaving documentation.

This command is not applicable in V1 as V1 does not support configured dual-motor axis slaving.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.