3D printer G-code · Marlin
G34: Z stepper auto-align (Marlin)
Z stepper auto-align — On printers with two or more independent Z motors, G34 probes under each motor and turns them until the gantry is level with the bed. Needs Z_STEPPER_AUTO_ALIGN. (Some…
On this page
| Property | Value |
|---|---|
| Command | G34 |
| Function | Z stepper auto-align |
| Firmware | Marlin |
| Group | Bed levelling |
| Syntax | G34 [I<iterations>] [T<accuracy>] |
What does G34 do?
On printers with two or more independent Z motors, G34 probes under each motor and turns them until the gantry is level with the bed. Needs Z_STEPPER_AUTO_ALIGN. (Some builds use G34 for mechanical gantry calibration against the top instead.) Klipper has Z_TILT_ADJUST for the same task.
Parameters
| Parameter | Meaning |
|---|---|
I | Number of rounds |
T | Target accuracy in mm |
Example
G28
G34
G28 ZTips from practice
- Home Z again after G34, because the probe point changes.
Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.
Related commands
More bed levelling commands
| Command | Function | Firmware |
|---|---|---|
G29 | Bed levelling (probe the mesh) | Marlin |
M420 | Bed levelling state | Marlin |
M851 | Probe offset (Z offset) | Marlin |
M48 | Probe repeatability test | Marlin |
G26 | Mesh validation pattern | Marlin |
BED_MESH_CALIBRATE | Probe the bed mesh (Klipper) | Klipper |
BED_MESH_PROFILE | Save and load mesh profiles | Klipper |
Z_TILT_ADJUST | Level the gantry (two or three Z motors) | Klipper |
QUAD_GANTRY_LEVEL | Quad gantry level | Klipper |
PROBE_CALIBRATE | Find the probe Z offset | Klipper |
SET_GCODE_OFFSET | Live Z (babystep) | Klipper |
SCREWS_TILT_CALCULATE | Bed screw turns | Klipper |
Test it before you print
Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.
Open the simulator