---
tag: g034a
title: Z Steppers Auto-Alignment
brief: Align multiple Z steppers using a bed probe
author: shitcreek
contrib: classicrocker883

group: calibration
requires: Z_MULTI_ENDSTOPS | Z_STEPPER_AUTO_ALIGN

codes: [ G34 ]
related: [ M422, M906, M907 ]

parameters:

- tag: L
  optional: true
  description: Unlock all Z stepper motors.

- tag: Z
  optional: true
  description: Target specific Z stepper to lock/unlock (1-4).
  values:
  - type: int
    tag: 1-4

- tag: S
  optional: true
  description: Lock state; 0=UNLOCKED 1=LOCKED. If omitted, assume LOCKED.
  values:
  - type: bool

- tag: I
  optional: true
  description: Iterations - must be between 1 - 30
  values:
  - type: linear
    tag: 1-30

- tag: T
  optional: true
  description: Target accuracy - must be between 0.01 - 1.0
  values:
  - type: float
    tag: 0.01-1.0

- tag: A
  optional: true
  description: Amplification - must be between 0.5 - 2.0
  values:
  - type: float
    tag: 0.5-2.0

- tag: E
  optional: true
  description: Stow probe after probing each point.
  values:
  - type: bool

- tag: R
  optional: true
  description: Recalculate points based on current probe offsets.

videos:
- 6UgT9YqY3UA

examples:
- pre: 'Align Z steppers:'
  code: G34

- pre: 'Lock/Unlock Z steppers:'
  code: |
    G34 Z1 ; Lock Z1
    G34 L Z2 ; Unlock all, then lock Z2
    G34 Z2 S0 ; Unlock Z2

---

Align multiple Z stepper motors using a bed probe by probing one position per stepper. See [`M422`](/docs/gcode/M422.html) for Z-Stepper automatic alignment parameter selection. Also see `HOME_AFTER_G34` in `Configuration_adv.h`
