3D printer G-code · Klipper
SET_GCODE_OFFSET: Live Z (babystep) (Klipper)
Live Z (babystep) — Shifts all following G-code positions, mostly used for the first layer Z while printing. Z_ADJUST adds to the current value. Marlin does the same with M290 babystepping.
On this page
| Property | Value |
|---|---|
| Command | SET_GCODE_OFFSET |
| Function | Live Z (babystep) |
| Firmware | Klipper |
| Group | Bed levelling |
| Syntax | SET_GCODE_OFFSET Z=<mm> | Z_ADJUST=<mm> [MOVE=1] |
What does SET_GCODE_OFFSET do?
Shifts all following G-code positions, mostly used for the first layer Z while printing. Z_ADJUST adds to the current value. Marlin does the same with M290 babystepping.
Parameters
| Parameter | Meaning |
|---|---|
Z | Absolute offset |
Z_ADJUST | Add to the offset |
MOVE | 1 = move the nozzle now |
Example
SET_GCODE_OFFSET Z_ADJUST=-0.02 MOVE=1Tips from practice
- Z_OFFSET_APPLY_PROBE writes the live value into the probe offset (then SAVE_CONFIG).
Klipper. Extended commands need their section in printer.cfg. Results of calibration commands are kept only after SAVE_CONFIG.
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 |
G34 | Z stepper auto-align | 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 |
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 simulatorFrequently asked questions
What does SET_GCODE_OFFSET do on a 3D printer?
SET_GCODE_OFFSET is live Z (babystep). Shifts all following G-code positions, mostly used for the first layer Z while printing. Z_ADJUST adds to the current value. Marlin does the same with M290 babystepping.
Does SET_GCODE_OFFSET work in Klipper and Marlin?
SET_GCODE_OFFSET is a Klipper command. Marlin printers use other G-codes for this task.
Was this page helpful?