Purge and check before resuming after a PAUSE
_RESUME_PRINT purges 40 mm with BLOBIFIER_CHECKED (instead of the 2 mm unretract), so the nozzle is primed, wiped and checked before going back to the print. A failed purge check raises an error that aborts the whole resume, AFC_RESUME's restore included, so the printer stays paused; the next RESUME checks again. RESUME PURGE=0 skips the purge. The purge check records a failure in _PURGE_CHECK_CFG.last_failed, since its PAUSE has no effect while the printer is already paused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b6379621f6
commit
eb7e0d4482
4 files changed
+42
-6
No files matched your search
@@ -6,6 +6,10 @@
|
||||
# -> RESUME_BASE, then AFC restores the saved position
|
||||
# RESUME is defined only here: heating/heat_soak.cfg used to define its own,
|
||||
# which replaced this one completely (no unretract, no fan restore).
|
||||
# After a PAUSE, _RESUME_PRINT purges into the Blobifier with the purge check
|
||||
# (BLOBIFIER_CHECKED, afc/purge_check.cfg) before going back to the print, so
|
||||
# the nozzle is primed and clean. If the check fails the resume stops with an
|
||||
# error and the printer stays paused. RESUME PURGE=0 resumes without the purge.
|
||||
|
||||
# https://klipperscreen.readthedocs.io/en/latest/macros/#recommended
|
||||
[gcode_macro PAUSE]
|
||||
@@ -33,10 +37,12 @@ gcode:
|
||||
HEAT_SOAK_RESUME ON_RESUME=_RESUME_PRINT {rawparams}
|
||||
|
||||
[gcode_macro _RESUME_PRINT]
|
||||
description: Resume after PAUSE: unretract, restore the part fan, continue the print
|
||||
description: Resume after PAUSE: purge and check (or unretract), restore the part fan, continue the print
|
||||
variable_purge_length: 40 # mm purged before resuming after a PAUSE; 0 = only unretract
|
||||
gcode:
|
||||
{% set pause = printer["gcode_macro PAUSE"] %}
|
||||
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
|
||||
{% set purge = params.PURGE|default(purge_length)|float %}
|
||||
#### get VELOCITY parameter if specified ####
|
||||
{% if 'VELOCITY' in params|upper %}
|
||||
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
|
||||
@@ -47,9 +53,13 @@ gcode:
|
||||
# Only undo what PAUSE did; HEAT_SOAK pauses with PAUSE_BASE (no retract, no park)
|
||||
{% if pause.parked %}
|
||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||
M83
|
||||
G1 E{extrude} F2100
|
||||
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
|
||||
{% if purge > 0 and 'gcode_macro BLOBIFIER' in printer %}
|
||||
_RESUME_PURGE LENGTH={purge} ; also replaces the unretract; stops here if the check fails
|
||||
{% else %}
|
||||
M83
|
||||
G1 E{extrude} F2100
|
||||
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{action_respond_info("Extruder not hot enough")}
|
||||
{% endif %}
|
||||
@@ -67,6 +77,27 @@ gcode:
|
||||
RESUME_BASE {get_params}
|
||||
_status_printing
|
||||
|
||||
[gcode_macro _RESUME_PURGE]
|
||||
description: Purge LENGTH mm into the Blobifier (with the purge check if installed) before resuming
|
||||
gcode:
|
||||
{% if 'gcode_macro BLOBIFIER_CHECKED' in printer %}
|
||||
SET_GCODE_VARIABLE MACRO=_PURGE_CHECK_CFG VARIABLE=last_failed VALUE=False
|
||||
BLOBIFIER_CHECKED PURGE_LENGTH={params.LENGTH}
|
||||
_RESUME_PURGE_VERIFY
|
||||
{% else %}
|
||||
BLOBIFIER PURGE_LENGTH={params.LENGTH}
|
||||
{% endif %}
|
||||
|
||||
# Separate macro so the check result is read after the purge. Raising an
|
||||
# error aborts the whole RESUME (AFC_RESUME included): the printer stays
|
||||
# paused at the bucket and PAUSE.parked stays set, so the next RESUME purges
|
||||
# and checks again.
|
||||
[gcode_macro _RESUME_PURGE_VERIFY]
|
||||
gcode:
|
||||
{% if printer["gcode_macro _PURGE_CHECK_CFG"].last_failed %}
|
||||
{action_raise_error("Purge check failed: the print stays paused. Check the extruder and lane, then RESUME again (RESUME PURGE=0 resumes without purging).")}
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
|
||||
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
|
||||
variable_extrude: 2.0
|
||||
|
||||
Reference in new issue
Block a user