Kipper Disabling Steppers/Cooling Down After M600

Hello All,

I have encountered an infuriating issue, and I believe it is with my pause_part_cancel macro. The issue is: Every time I run an color change --my m600 macro is up to scratch-- It will behave normally. Parking the toolhead, unloading filament, and awaiting instructions. However, if I forget about it and leave it for too long in that state. It will disable steppers AND cool down, which I most certainly don’t want it to do.

Could someone more knowledgeable please look over my macros and let me know what the problem is, or if this is just how klipper handles things, let me know? I’d really appreciate it.

I am running a BTT Manta, and if anyone knows if there is a beeper on that board, I would be most happy to enable it, so I would be less likely to forget, however, if I do forget, I would really not like this to happen. Running the latest klipper version on CB1 and Latest compiled mcu firmware, so not an old firmware issue.

Here are my macros. I know it is long, however, I don’t quite know where the issue exactly resides. This is a direct copy from my mainsail cfg which is where I keep my macros. Here they are:

[gcode_macro START_PRINT]
gcode:

{% set BED_TEMP = params.BED_TEMP|default(60)|float %}

{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}

# Start bed heating

M140 S{BED_TEMP}

# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
#Restore Bed Mesh
BED_MESH_PROFILE LOAD=default
# Move the nozzle near the bed
G1 Z5 F3000
# Move Nozzle To Edge Of Bed
G1 X0 F3000
G1 Y0 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
#Purge Line
# Wait for bed to reach temperature

M190 S{BED_TEMP}

# Set and wait for nozzle to reach temperature

M109 S{EXTRUDER_TEMP}

[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers
M84

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
variable_park: True
gcode:

Move head and retract only if not already in the pause state and park set to true

{% if printer.pause_resume.is_paused|lower == ‘false’ and park|lower == ‘true’%}
PAUSE
{% endif %}
TURN_OFF_HEATERS
M106 S0
CANCEL_PRINT_BASE

[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
{% if printer.virtual_sdcard.is_active == True %}
{% if printer.pause_resume.is_paused == False %}
PAUSE_BASE
_TOOLHEAD_PARK_PAUSE_CANCEL
{% endif %}
{% endif %}

[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
{% if printer.pause_resume.is_paused %}
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####
{% set extrude = printer[‘gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL’].extrude_extrude %}
#### get VELOCITY parameter if specified ####
{% if ‘VELOCITY’ in params|upper %}
{% set get_params = (‘VELOCITY=’ + params.VELOCITY) %}
{%else %}
{% set get_params = “” %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == ‘true’ %}
M83
G1 E{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == ‘true’ %} M82 {% endif %}
{% else %}
{action_respond_info(“Extruder not hot enough”)}
{% endif %}
RESUME_BASE {get_params}
{% endif %}

[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
variable_retract_extrude: 10.0
variable_extrude_extrude: 11.0
gcode:

set park positon for x and y

default is your max posion from your printer.cfg

{% set x_park = printer.toolhead.axis_minimum.x|float + 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set z_park_delta = 2.0 %}

calculate save lift position

{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - z_park_delta) %}
{% set z_safe = z_park_delta %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}

end of definitions

{% if printer.extruder.can_extrude|lower == ‘true’ %}
M83
G1 E-{retract_extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == ‘true’ %} M82 {% endif %}
{% else %}
{action_respond_info(“Extruder not hot enough”)}
{% endif %}
{% if “xyz” in printer.toolhead.homed_axes %}
G91
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% if printer.gcode_move.absolute_coordinates|lower == ‘false’ %} G91 {% endif %}
{% else %}
{action_respond_info(“Printer not homed”)}
{% endif %}

[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state

Thank you all, and have a nice day,
Blake

That’s the default idle timeout behavior. See here about your options: https://www.reddit.com/r/klippers/comments/wfzcim/is_there_a_way_to_stop_klipper_from_powering_down/

Hello, theophile

Thank you so much for your feedback! This is an obscure setting that I didn’t know about before, and I am truly thankful for your help. I have one last question. In the Configuration Reference, there is a whole section describing this. It doesn’t however describe where to put this block of code. So. . . where do I put it?

Thanks again,
Blake

Klipper has uncommonly good documentation. For example, the Configuration Reference itself tells you right at the beginning that it describes settings you include in your printer’s config file. :wink:

Lol

I was in a hurry, thank you very much!

Blake