Skip to main content

Pause and Cancel Print at Custom Position

  • Add [include mainsail.cfg] or [include fluidd.cfg] in printer.cfg
  • Add the following macro to printer.cfg

Chinese Translation

[gcode_macro _CLIENT_VARIABLE]
### Pause Macro Related Custom Settings
variable_use_custom_pos : False ; Whether to use x, y custom parking coordinates [True/False]
variable_custom_park_x : 0.0 ; X position when pausing print
variable_custom_park_y : 0.0 ; Y position when pausing print
variable_custom_park_dz : 2.0 ; Z lifting distance (in millimeters) when moving to parking position during pause

### Cancel Pause Macro Related Custom Settings
variable_park_at_cancel : False ; Allow the toolhead to move to parking position when executing the cancel print macro [True/False]
variable_park_at_cancel_x : None ; Different parking position during cancel print [None/Position as Float]; park_at_cancel must be True
variable_park_at_cancel_y : None ; Different parking position during cancel print [None/Position as Float]; park_at_cancel must be True

### Extruder actions when pausing and canceling
variable_retract : 1.0 ; Retraction length (in millimeters) for extruder when pausing print
variable_cancel_retract : 5.0 ; Retraction length (in millimeters) for extruder when canceling print
variable_speed_retract : 35.0 ; Retraction speed (mm/s)
variable_unretract : 1.0 ; Unretract length (in millimeters) for extruder when resuming print
variable_speed_unretract : 35.0 ; Unretract speed (mm/s)
variable_speed_hop : 15.0 ; Z-axis movement speed (mm/s)
variable_speed_move : 100.0 ; Movement speed (mm/s)

### Turn off motor heating configuration
### One day is 86400 seconds
variable_idle_timeout : 0 ; Number of seconds until idle timeout kicks in. Setting to 0 means no value will be set or restored

# !!!Caution if you set use_fw_retract: True, then [firmware_retraction] must be defined in printer.cfg!!!
variable_use_fw_retract : False ; Use firmware retraction instead of manual version [True/False]
variable_runout_sensor : "" ; If a sensor is defined, it will be used to cancel the execution of RESUME when no filament is detected.
# Specify the configuration name of the runout sensor, e.g., "filament_switch_sensor runout". Note: Use the same as in your printer.cfg
# !!!Custom macros, please use with care and review the section of the corresponding macro.
# These macros are for simple operations like setting a status LED. Please ensure your macro does not interfere with the basic macro functions.
# Only single-line commands are supported, please create a macro if you need more than one command.
variable_user_pause_macro : "" ; Everything inside the "" will be executed after the Klipper base pause (PAUSE_BASE) function
variable_user_resume_macro: "" ; Everything inside the "" will be executed before the Klipper base resume (RESUME_BASE) function
variable_user_cancel_macro: "" ; Everything inside the "" will be executed before the Klipper base cancel (CANCEL_PRINT_BASE) function
gcode: