Skip to main content

Advanced Commands and System Operations

This article collects common debugging commands for extrusion, motion control, bed mesh, resonance compensation, system control, and special module types.

For basic debugging commands related to drivers, heating, endstops, and probes, please refer to Common Debugging Commands.

Manual Extrude/Retract

G91 # Switch to relative positioning mode
G1 E10 F300 # Extrude 10mm at 300mm/min
G1 E-10 F300 # Retract 10mm
G90 # Switch back to absolute positioning mode

Filament Sensor

QUERY_FILAMENT_SENSOR SENSOR=filament_sensor # Query filament runout detection status

Pressure Advance Calibration

TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
  • Save after calibration:
SET_PRESSURE_ADVANCE ADVANCE=0.05 # Set pressure advance value
SAVE_CONFIG # Save to configuration

Motion Control

Basic Movement Commands

G90 # Absolute positioning mode
G91 # Relative positioning mode
G1 X100 Y100 Z20 F6000 # Move to specified coordinates
G28 # Home all axes
G28 X # Home X axis only
G28 Y # Home Y axis only
G28 Z # Home Z axis only

Direction Verification After Homing

G90
G1 X10 Y10 Z20 F3000 # Move towards minimum direction
G1 X150 Y150 Z20 F3000 # Move towards maximum direction

Motor Control

M84 # Release all motors (disable)
M84 X Y # Release X and Y axis motors only
M18 # Equivalent to M84, disable all motors
M17 # Re-enable all motors

Manual Stepper Control

MANUAL_STEPPER STEPPER=stepper_x ENABLE=1 SPEED=10 MOVE=10 # Move X axis 10mm in positive direction
MANUAL_STEPPER STEPPER=stepper_x ENABLE=1 SPEED=10 MOVE=-10 # Move X axis 10mm in negative direction

Bed Mesh

Bed Mesh Probing

BED_MESH_CALIBRATE # Full bed mesh probing
BED_MESH_CALIBRATE horizontal_move_z=2 METHOD=rapid_scan # Fast scan mode
BED_MESH_CALIBRATE ADAPTIVE=1 # Adaptive probing (probe only the print area)

Bed Mesh Management

BED_MESH_PROFILE SAVE=default # Save bed mesh as default
BED_MESH_PROFILE LOAD=default # Load default bed mesh
BED_MESH_PROFILE REMOVE=default # Delete default bed mesh
BED_MESH_CLEAR # Unload current bed mesh
BED_MESH_OUTPUT # Output bed mesh data to console

Z Tilt Adjustment

Z_TILT_ADJUST # Z tilt adjustment (dual Z / triple Z)
QUAD_GANTRY_LEVEL # Quad gantry leveling (Voron, etc.)

Resonance Compensation

Accelerometer

ACCELEROMETER_QUERY # Query accelerometer status

Resonance Test

TEST_RESONANCES AXIS=X # X axis resonance test
TEST_RESONANCES AXIS=Y # Y axis resonance test
SHAPER_CALIBRATE AXIS=X # X axis input shaper auto calibration
SHAPER_CALIBRATE AXIS=Y # Y axis input shaper auto calibration
  • Save after calibration:
SAVE_CONFIG # Save resonance compensation results

System Control

Firmware Restart

RESTART # Reload Klipper host firmware
FIRMWARE_RESTART # Full restart (MCU reset)

Status View

STATUS # View printer current status
M115 # View firmware version information

Emergency Stop

M112 # Emergency stop (immediately stop all actions)
M999 # Clear emergency stop state

Configuration File Operations

SAVE_CONFIG # Save calibration results to printer.cfg
Note

The configuration written by SAVE_CONFIG is located in the #*# DO NOT EDIT THIS BLOCK comment block at the bottom of the file. These values will take effect after the next restart.


Special Types

Servo

Tip

Servos are divided into 180° and 360° types; please pay attention to the distinction.

  • Reference configuration:

    [servo my_servo]
    pin: <servo_pin>
  • Reference commands:

    SET_SERVO SERVO=my_servo ANGLE=360
    SET_SERVO SERVO=my_servo ANGLE=180
    SET_SERVO SERVO=my_servo ANGLE=0

LED / Neopixel

SET_LED LED=my_neopixel RED=1 GREEN=0 BLUE=0 # Set to red
SET_LED LED=my_neopixel RED=0 GREEN=0 BLUE=0 # Turn off
Loading...