This page continues Klipper commands, A to G,
which also explains how Klipper reads a line. It lists the extended commands of the
modules from hall_filament_width_sensor to z_tilt. A command
exists only when its configuration section is present, except where the module loads
by itself. Brackets mark optional parameters. Probe parameters means the
optional parameters of PROBE, given below.
Filament width, heaters, shaping and lights (hall_filament_width_sensor to led)
| Command and parameters | Effect |
|---|---|
QUERY_FILAMENT_WIDTH | Report the measured filament width |
QUERY_RAW_FILAMENT_WIDTH | Report the sensor’s raw readings and width |
RESET_FILAMENT_WIDTH_SENSOR | Clear the readings and set flow to 100% |
ENABLE_FILAMENT_WIDTH_SENSOR [FLOW_COMPENSATION=0|1] | Start the sensor, with or without flow compensation |
DISABLE_FILAMENT_WIDTH_SENSOR | Stop the sensor |
ENABLE_FILAMENT_WIDTH_LOG, DISABLE_FILAMENT_WIDTH_LOG | Turn diameter logging on or off |
TURN_OFF_HEATERS | Turn all heaters off |
TEMPERATURE_WAIT SENSOR= [MINIMUM=] [MAXIMUM=] | Wait until a sensor is at least MINIMUM and/or at most MAXIMUM |
SET_HEATER_TEMPERATURE HEATER= [TARGET=] | Set a heater’s target; without TARGET it is 0 |
SET_IDLE_TIMEOUT [TIMEOUT=seconds] | Set the idle timeout |
SET_INPUT_SHAPER [SHAPER_FREQ_X=] [SHAPER_FREQ_Y=] [SHAPER_FREQ_Z=] [DAMPING_RATIO_X=] [DAMPING_RATIO_Y=] [DAMPING_RATIO_Z=] [SHAPER_TYPE=] [SHAPER_TYPE_X=] [SHAPER_TYPE_Y=] [SHAPER_TYPE_Z=] | Change input shaper settings. SHAPER_TYPE sets all axes and cannot be combined with the per-axis types. (The documentation’s synopsis prints SHAPER_FREQ_Y twice; its text describes X, Y and Z.) |
SET_LED LED= RED= GREEN= BLUE= WHITE= [INDEX=] [TRANSMIT=0] [SYNC=1] | Set LED colours from 0.0 to 1.0. INDEX counts from 1 along a chain; TRANSMIT=0 delays sending; SYNC=0 applies at once without waiting for queued moves |
SET_LED_TEMPLATE LED= TEMPLATE= [param=literal] [INDEX=] | Drive an LED from a display template; empty TEMPLATE removes it |
Load cells, manual probing and extra steppers (load_cell to palette2)
| Command and parameters | Effect |
|---|---|
LOAD_CELL_DIAGNOSTIC [LOAD_CELL=] | Collect 10 s of data and report statistics |
LOAD_CELL_CALIBRATE [LOAD_CELL=] | Start guided calibration, which takes TARE, CALIBRATE GRAMS=n, ACCEPT and ABORT |
LOAD_CELL_TARE, LOAD_CELL_READ (each [LOAD_CELL=]) | Zero the cell; take a reading |
LOAD_CELL_TEST_TAP [TAPS=] [TIMEOUT=seconds] | load_cell_probe. Test the tap detection without moving |
PROBE … [FORCE_SAFETY_LIMIT=] [TRIGGER_FORCE=] [DRIFT_FILTER_CUTOFF_FREQUENCY=] [DRIFT_FILTER_DELAY=1|2] [BUZZ_FILTER_CUTOFF_FREQUENCY=] [BUZZ_FILTER_DELAY=1|2] [NOTCH_FILTER_FREQUENCIES=] [NOTCH_FILTER_QUALITY=] [TARE_TIME=] | Extra parameters of probing commands with a load cell probe (grams, Hz, seconds) |
MANUAL_PROBE [SPEED=] | Start manual height finding; SPEED is that of TESTZ moves (default 5 mm/s) |
TESTZ Z=value | While probing, move the nozzle: a distance, or +, -, ++, -- to move relative to earlier attempts |
ACCEPT, ABORT | Take the present height; give up |
Z_ENDSTOP_CALIBRATE [SPEED=] | Find the Z endstop position by hand |
Z_OFFSET_APPLY_ENDSTOP | Fold the present Z offset into the endstop setting; persist with SAVE_CONFIG |
MANUAL_STEPPER STEPPER= [ENABLE=0|1] [SET_POSITION=] [SPEED=] [ACCEL=] [MOVE= [SYNC=0]] | Control a manual stepper; ACCEL=0 means no acceleration; SYNC=0 does not wait for the move |
MANUAL_STEPPER STEPPER= … MOVE= STOP_ON_ENDSTOP=mode | Stop at a switch. Modes: probe, home, inverted_probe, inverted_home, try_probe, try_inverted_probe, try_home, try_inverted_home |
MANUAL_STEPPER STEPPER= GCODE_AXIS=A–Z [LIMIT_VELOCITY=] [LIMIT_ACCEL=] [INSTANTANEOUS_CORNER_VELOCITY=] | Register the stepper as an extra axis of G1 (corner velocity default 1); an empty GCODE_AXIS= removes it |
SET_DIGIPOT DIGIPOT= WIPER= | mcp4018. Wiper value from 0.0 to 1.0, or up to the configured scale |
SET_PIN PIN= VALUE= | output_pin and pwm_tool. Set an output |
SET_PIN PIN= TEMPLATE= [param=literal] | Drive the output from a template |
PALETTE_CONNECT, PALETTE_DISCONNECT, PALETTE_CLEAR, PALETTE_CUT, PALETTE_SMART_LOAD | palette2. Connect, disconnect, clear loading state, cut filament and start the smart load sequence |
Printing, probing and levelling (pause_resume to query_endstops)
| Command and parameters | Effect |
|---|---|
PAUSE | Pause the print, remembering the position |
RESUME [VELOCITY=] | Resume, returning to the position at the given speed |
CLEAR_PAUSE | Clear the paused state without resuming |
CANCEL_PRINT | Cancel the print |
PID_CALIBRATE HEATER= TARGET= [WRITE_FILE=1] | Tune a heater’s PID values; WRITE_FILE=1 logs samples to /tmp/heattest.txt |
SET_PRINT_STATS_INFO [TOTAL_LAYER=] [CURRENT_LAYER=] | Tell Klipper the layer counts; slicers can put this in start and layer-change G-code |
PROBE [PROBE_SPEED=] [LIFT_SPEED=] [SAMPLES=] [SAMPLE_RETRACT_DIST=] [SAMPLES_TOLERANCE=] [SAMPLES_TOLERANCE_RETRIES=] [SAMPLES_RESULT=median|average] | Probe down; the parameters override the probe configuration |
QUERY_PROBE | Report triggered or open |
PROBE_ACCURACY [PROBE_SPEED=] [SAMPLES=] [SAMPLE_RETRACT_DIST=] | Probe repeatedly (default 10) and report statistics |
PROBE_CALIBRATE [SPEED=] [probe parameters] | Calibrate the probe’s Z offset with the manual probing commands |
Z_OFFSET_APPLY_PROBE [METHOD=tap] | Fold the present Z offset into the probe’s offset, or into the tap offset of an eddy probe; persist with SAVE_CONFIG |
PROBE … [METHOD=scan|rapid_scan|tap] [SAMPLE_TIME=] [TAP_THRESHOLD=] | probe_eddy_current. Extra parameters of probing commands: pause over each point, read on the fly, or touch the bed; sample time defaults to 0.1 s. Without METHOD the head descends to the configured height |
PROBE_EDDY_CURRENT_CALIBRATE CHIP= [MANUAL_METHOD=manual] | Calibrate frequency against height |
PROBE_EDDY_CURRENT_TAP_CALIBRATE [TAP=guess|refine|verify] | Calibrate the tap threshold |
LDC_CALIBRATE_DRIVE_CURRENT CHIP= | Calibrate the LDC1612 drive current, sensor about 20 mm above the bed centre |
SET_PIN PIN= VALUE= [CYCLE_TIME=seconds] | pwm_cycle_time. Set an output with an explicit cycle time, which is not remembered |
QUAD_GANTRY_LEVEL [RETRIES=] [RETRY_TOLERANCE=] [HORIZONTAL_MOVE_Z=] [probe parameters] | Probe and level a four-motor gantry |
QUERY_ADC [NAME=] [PULLUP=ohms] | Report an analogue reading, or the names available; with PULLUP also the resistance |
QUERY_ENDSTOPS | Report each endstop as triggered or open |
Resonance, replies, variables and files (resonance_tester to sdcard_loop)
| Command and parameters | Effect |
|---|---|
MEASURE_AXES_NOISE | Report accelerometer noise on all axes |
TEST_RESONANCES AXIS= [OUTPUT=resonances,raw_data] [NAME=] [FREQ_START=] [FREQ_END=] [ACCEL_PER_HZ=] [HZ_PER_SEC=] [CHIPS=] [POINT=x,y,z] [INPUT_SHAPING=0|1] | Run the resonance test. AXIS is X, Y, Z or a direction dx,dy[,dz]; shaping is off unless asked; OUTPUT defaults to resonances, NAME to the time; CSV files go to /tmp |
SHAPER_CALIBRATE [AXIS=] [NAME=] [FREQ_START=] [FREQ_END=] [ACCEL_PER_HZ=] [HZ_PER_SEC=] [CHIPS=] [MAX_SMOOTHING=] [INPUT_SHAPING=0|1] | Test and recommend shaper settings for one axis, or X and Y |
M118 message | respond. Echo with the configured prefix or echo: |
RESPOND MSG="…" [TYPE=echo|echo_no_space|command|error] [PREFIX=] | Send a reply: echo: , echo: without the space, // or !! ; PREFIX overrides TYPE |
SAVE_VARIABLE VARIABLE= VALUE= | Store a variable on disk; the name must be lower case, the value a Python literal |
SCREWS_TILT_CALCULATE [DIRECTION=CW|CCW] [MAX_DEVIATION=] [HORIZONTAL_MOVE_Z=] [probe parameters] | Probe above the bed screws and say how far to turn each; home first. MAX_DEVIATION raises an error if exceeded |
SDCARD_LOOP_BEGIN COUNT= | Begin a repeated part of the file; 0 repeats for ever |
SDCARD_LOOP_END | End of the repeated part |
SDCARD_LOOP_DESIST | Finish the present loops without repeating again |
Servos, skew, drivers and the rest (servo to z_tilt)
| Command and parameters | Effect |
|---|---|
SET_SERVO SERVO= [ANGLE=degrees | WIDTH=seconds] | Move a servo; WIDTH=0 turns the output off |
SET_SKEW [XY=ac,bd,ad] [XZ=ac,bd,ad] [YZ=ac,bd,ad] [CLEAR=0|1] | Set skew correction from measured diagonals and side (mm) |
GET_CURRENT_SKEW | Report skew in radians and degrees |
CALC_MEASURED_SKEW [AC=] [BD=] [AD=] | Work out skew from a measured print |
SKEW_PROFILE [LOAD=] [SAVE=] [REMOVE=] | Manage skew profiles; saving or removing needs SAVE_CONFIG |
SET_SMART_EFFECTOR [SENSITIVITY=0–255] [ACCEL=] [RECOVERY_TIME=] | Set Smart Effector values; sensitivity (default 50) is written to its memory and needs control_pin |
RESET_SMART_EFFECTOR | Restore its factory sensitivity |
SET_STEPPER_ENABLE STEPPER= ENABLE=0|1 | Switch one stepper, for diagnosis |
SET_TEMPERATURE_FAN_TARGET temperature_fan= [target=] [min_speed=] [max_speed=] | Change a temperature-controlled fan; without a target the configured one returns |
TEMPERATURE_PROBE_CALIBRATE [PROBE=] [TARGET=] [STEP=] [MANUAL_METHOD=] | Calibrate eddy probe temperature drift until TARGET; STEP defaults to 2 °C. The text also names METHOD=tap for automatic probing |
TEMPERATURE_PROBE_NEXT, TEMPERATURE_PROBE_COMPLETE, ABORT | During that calibration: take the next sample, finish and keep, or discard |
TEMPERATURE_PROBE_ENABLE ENABLE=0|1 | Drift compensation on or off |
DUMP_TMC STEPPER= [REGISTER=] | Report a TMC driver’s registers |
INIT_TMC STEPPER= | Initialise the registers again, as after a loss of driver power |
SET_TMC_CURRENT STEPPER= CURRENT=amps HOLDCURRENT=amps | Set run and hold current; no hold current on TMC2660 |
SET_TMC_FIELD STEPPER= FIELD= VALUE= or VELOCITY= | Write one register field without checks; VELOCITY is converted for velocity fields |
SET_VELOCITY_LIMIT [VELOCITY=] [ACCEL=] [MINIMUM_CRUISE_RATIO=] [SQUARE_CORNER_VELOCITY=] | Change the motion limits; common in slicer output |
TUNING_TOWER COMMAND= PARAMETER= START= [SKIP=] [FACTOR= [BAND=]] | [STEP_DELTA= STEP_HEIGHT=] | Vary a parameter with height: start + factor × z; in bands, start + factor × ((floor(z / band) + 0.5) × band); or stepped, start + step_delta × floor(z / step_height). SKIP delays the start |
M20, M21, M23 to M27 | virtual_sdcard. See the table on the first Klipper page |
SDCARD_PRINT_FILE FILENAME= | Load a file and print it |
SDCARD_RESET_FILE | Unload the file and clear the state |
SET_Z_THERMAL_ADJUST [ENABLE=0|1] [TEMP_COEFF=] [REF_TEMP=] | Control height correction for frame temperature; disabling freezes the present correction |
Z_TILT_ADJUST [RETRIES=] [RETRY_TOLERANCE=] [HORIZONTAL_MOVE_Z=] [probe parameters] | Probe and level with independent Z motors |
Sources
- G-Codes – Klipper’s list of supported commands, read from
docs/G-Codes.mdin the source tree on 3 December 2026