thinkyhead

G28 - Auto Home

calibration Auto home one or more axes.

Description

When you first start up your machine it has no idea where the toolhead is positioned, so Marlin needs to use a procedure called “homing” to establish a known position. To do this it moves each axis towards one end of its track until it triggers a switch, commonly called an “endstop.” Marlin knows where the endstops are, so once all the endstops have been triggered the position is known.

The G28 command is used to home one or more axes. The default behavior with no parameters is to home all axes.

In order to improve positional accuracy, the homing procedure can re-bump at a slower speed according to the [XYZ]_HOME_BUMP_MM and HOMING_BUMP_DIVISOR settings.

The position is easy to lose when the steppers are turned off, so homing may be required or advised after the machine has been sitting idle for a period of time. See the Configuration files for all homing options.

Notes

  • Homing is required before G29, M48, and some other procedures.
  • If homing is needed the LCD will blink the X Y Z indicators.
  • By default G28 disables bed leveling. Follow with M420 S to turn leveling on.
    • With ENABLE_LEVELING_AFTER_G28 leveling will always be enabled after G28.
    • With RESTORE_LEVELING_AFTER_G28 leveling is restored to whatever state it was in before G28.

Usage

G28 [A] [B] [C] [L] [O] [R] [U] [V] [W] [X] [Y] [Z]

Parameters

[A]
2.0.9
I_DRIVER_TYPE AXIS4_NAME 'A'

Flag to home the A axis

[B]
2.0.9
J_DRIVER_TYPE AXIS5_NAME 'B'

Flag to home the B axis

[C]
2.0.9
K_DRIVER_TYPE AXIS6_NAME 'C'

Flag to home the C axis

[L]

Flag to restore bed leveling state after homing. (default true)

[O]
1.1.9

Flag to skip homing if the position is already trusted

[R]
1.1.9

The distance to raise the nozzle before homing

[U]
2.1
U_DRIVER_TYPE AXIS7_NAME 'U'

Flag to home the U axis

[V]
2.1
V_DRIVER_TYPE AXIS8_NAME 'V'

Flag to home the V axis

[W]
2.1
W_DRIVER_TYPE AXIS9_NAME 'W'

Flag to home the W axis

[X]

Flag to home the X axis

[Y]

Flag to home the Y axis

[Z]

Flag to home the Z axis

Examples

The most-used form of this command is to home all axes:

G28 ; Home all axes
G28 X Z ; Home the X and Z axes
G28 O ; Home all "untrusted" axes