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.

By cnccode · Updated
On this page
  1. What does SET_GCODE_OFFSET do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More bed levelling commands
  7. Frequently asked questions
PropertyValue
CommandSET_GCODE_OFFSET
FunctionLive Z (babystep)
FirmwareKlipper
GroupBed levelling
SyntaxSET_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

ParameterMeaning
ZAbsolute offset
Z_ADJUSTAdd to the offset
MOVE1 = move the nozzle now

Example

Klipper
SET_GCODE_OFFSET Z_ADJUST=-0.02 MOVE=1

Tips 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.

More bed levelling commands

CommandFunctionFirmware
G29Bed levelling (probe the mesh)Marlin
M420Bed levelling stateMarlin
M851Probe offset (Z offset)Marlin
M48Probe repeatability testMarlin
G34Z stepper auto-alignMarlin
G26Mesh validation patternMarlin
BED_MESH_CALIBRATEProbe the bed mesh (Klipper)Klipper
BED_MESH_PROFILESave and load mesh profilesKlipper
Z_TILT_ADJUSTLevel the gantry (two or three Z motors)Klipper
QUAD_GANTRY_LEVELQuad gantry levelKlipper
PROBE_CALIBRATEFind the probe Z offsetKlipper
SCREWS_TILT_CALCULATEBed screw turnsKlipper

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

Frequently 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?