---
tag: m0915
title: TMC Z axis calibration
brief: Align ends of the Z axis and test torque
author: thinkyhead

deprecated: 2.0.0
requires: TMC2130,TMC_Z_CALIBRATION
group: control

codes: [ M915 ]

notes:
  - This command is deprecated. Use `G34` ([`Z_STEPPER_AUTO_ALIGN`](/docs/gcode/G034-zsaa.html) or [`MECHANICAL_GANTRY_CALIBRATION`](/docs/gcode/G034-mgc.html)) instead.
  - Requires `TMC_Z_CALIBRATION` and at least one TMC driver for Z axis.
  - If `Z_DUAL_STEPPER_DRIVERS` is used, both should be TMC drivers.

parameters:
  -
    tag: S
    optional: true
    description: "Current value to use for the raise move. (Default: `CALIBRATION_CURRENT`)"
    values:
      -
        unit: mA
        type: int
  -
    tag: Z
    optional: true
    description: "Extra distance past `Z_MAX_POS` to move the Z axis. (Default: `CALIBRATION_EXTRA_HEIGHT`)"
    values:
      -
        unit: linear
        type: float

videos:
  - JqH41K2vq0g

example:
  -
    pre: Set a 300mA current and press the gantry against the top for 5 extra mm.
    code:
      - G21 ; Units to mm
      - M915 S300 Z5

---

The command aims to align the ends of the X gantry (for a Průša i3-style printer). See the [video demonstration](//youtu.be/JqH41K2vq0g?t=300) above.

Using the given current, Marlin will move the Z axis (at homing speed) to the top plus a given extra distance. _Since this intentionally stalls the Z steppers, you should use the minimum current required to move the axis._

Z is then re-homed to correct the position.
