Bed soak on bed_side with a minimum time (measured)

Beacon meshes every 3 min on 2026-11-02 showed the 10 mm plate settles
~33 min after the bed reaches 100C with the chamber at 50C, and ~11 min at
60C with the chamber open. The old soak ended far earlier (bed_core within
5C, or the chamber reaching its target). HEAT_SOAK gets MIN_TIME=<minutes>
(default 0); PRINT_WARMUP soaks on bed_side with RATE 0.05 over 120 s,
SOAK_TEMP 70% of the bed target, MIN_TIME 35 (chamber) / 12 (no chamber),
and skips the soak without a bed target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-02 16:58:20 +01:00
1 parent f25f348d0b
commit 13e49e43c7
2 files changed
+31 -9

No files matched your search

+12 -4
View File
@@ -1,7 +1,10 @@
# HEAT_SOAK: wait for a sensor to reach thermal equilibrium (community macro) # HEAT_SOAK: wait for a sensor to reach thermal equilibrium (community macro)
## ##
## HEAT_SOAK HEATER=<heater_name> TARGET=<target_heater_temperature> SOAKER=<heat_soak_temp_sensor_name> [RATE=<heat_soak_temp_rate_of_change>] [TIMEOUT=<time_to_abort_heat_soak>] ## HEAT_SOAK HEATER=<heater_name> TARGET=<target_heater_temperature> SOAKER=<heat_soak_temp_sensor_name> [RATE=<heat_soak_temp_rate_of_change>] [TIMEOUT=<time_to_abort_heat_soak>] [MIN_TIME=<minutes>]
##
## MIN_TIME (added here, default 0): the soak does not complete before this many
## minutes of soaking, even when SOAK_TEMP and RATE are already met.
## ##
## ##
## e.g. ## e.g.
@@ -30,6 +33,7 @@ variable_soaker_sensor: None
variable_target_temp: 0.0 variable_target_temp: 0.0
variable_min_soak_temp: 0 variable_min_soak_temp: 0
variable_target_rate: 0.3 variable_target_rate: 0.3
variable_min_soak_time: 0
variable_complete: None variable_complete: None
variable_cancel: None variable_cancel: None
variable_temp_smooth_time: 4.0 variable_temp_smooth_time: 4.0
@@ -47,6 +51,7 @@ gcode:
{% set HEATER = (params.HEATER | string) %} # Optional heater {% set HEATER = (params.HEATER | string) %} # Optional heater
{% set TARGET = params.TARGET | default(0) | float %} {% set TARGET = params.TARGET | default(0) | float %}
{% set TIMEOUT = (params.TIMEOUT | default(30) | int) * 60 %} ## minutes to seconds {% set TIMEOUT = (params.TIMEOUT | default(30) | int) * 60 %} ## minutes to seconds
{% set MIN_TIME = (params.MIN_TIME | default(0) | float) * 60 %} ## minutes to seconds
{% set TEMP_SMOOTH = params.TEMP_SMOOTH | default(4.0) | float %} ## seconds for temp smoothing {% set TEMP_SMOOTH = params.TEMP_SMOOTH | default(4.0) | float %} ## seconds for temp smoothing
{% set RATE_SMOOTH = params.RATE_SMOOTH | default(20) | float %} ## seconds for rate smoothing {% set RATE_SMOOTH = params.RATE_SMOOTH | default(20) | float %} ## seconds for rate smoothing
{% set COMPLETE = (params.COMPLETE | string) %} {% set COMPLETE = (params.COMPLETE | string) %}
@@ -61,6 +66,7 @@ gcode:
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=soaker_sensor VALUE="{SOAKER | pprint}" SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=soaker_sensor VALUE="{SOAKER | pprint}"
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=target_rate VALUE={RATE} SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=target_rate VALUE={RATE}
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=soak_time_remaining VALUE={TIMEOUT} SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=soak_time_remaining VALUE={TIMEOUT}
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=min_soak_time VALUE={MIN_TIME}
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=complete VALUE="'{COMPLETE}'" SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=complete VALUE="'{COMPLETE}'"
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=cancel VALUE="'{CANCEL}'" SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=cancel VALUE="'{CANCEL}'"
SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=temp_smooth_time VALUE={TEMP_SMOOTH} SET_GCODE_VARIABLE MACRO=HEAT_SOAK VARIABLE=temp_smooth_time VALUE={TEMP_SMOOTH}
@@ -250,16 +256,18 @@ gcode:
{action_respond_info(message)} {action_respond_info(message)}
{% endif %} {% endif %}
# if the heat soak must continue for some reason # if the heat soak must continue for some reason
{% elif (slope > heat_soak.target_rate) or (heat_soak.min_soak_temp > 0 and soak_temp_smoothed < heat_soak.min_soak_temp) %} {% elif (slope > heat_soak.target_rate) or (heat_soak.min_soak_temp > 0 and soak_temp_smoothed < heat_soak.min_soak_temp) or (total_time_elapsed < heat_soak.min_soak_time) %}
{% if total_time_elapsed % heat_soak.soaking_report_interval == 0 %} {% if total_time_elapsed % heat_soak.soaking_report_interval == 0 %}
{% set format_vars = [ {% set format_vars = [
soak_temp_smoothed | float, soak_temp_smoothed | float,
(heat_soak.min_soak_temp | float | round(0) | string) if (heat_soak.min_soak_temp > 0) else "--", (heat_soak.min_soak_temp | float | round(0) | string) if (heat_soak.min_soak_temp > 0) else "--",
slope, slope,
heat_soak.target_rate, heat_soak.target_rate,
soak_time_remaining / 60.0 soak_time_remaining / 60.0,
total_time_elapsed / 60.0,
heat_soak.min_soak_time / 60.0
] %} ] %}
{% set message = "Soaking -- temp: {0:.1f}C / {1}C -- rate: {2:.3f}C/m / {3:.3f}C/m -- {4:.1f}m remaining".format(*format_vars) %} {% set message = "Soaking -- temp: {0:.1f}C / {1}C -- rate: {2:.3f}C/m / {3:.3f}C/m -- {5:.0f}m / min {6:.0f}m -- {4:.1f}m remaining".format(*format_vars) %}
M117 { message } M117 { message }
{action_respond_info(message)} {action_respond_info(message)}
{% endif %} {% endif %}
+19 -5
View File
@@ -68,14 +68,28 @@ gcode:
{% endif %} {% endif %}
{% if target_chamber > 30 %} {% if target_chamber > 30 %}
RESPOND MSG="waiting for chamber temperature" RESPOND MSG="soaking the bed (chamber heating)"
M141 S{target_chamber} M141 S{target_chamber}
M106 S255 M106 S255
# Unreachable SOAK_TEMP + CANCEL='_NOTHING': soaks until the TIMEOUT, then continues the print
HEAT_SOAK HEATER='heater_bed' TARGET={target_bed} SOAKER='temperature_sensor chamber' SOAK_TEMP={target_chamber} TIMEOUT=60 CANCEL='_NOTHING'
{% else %} {% else %}
RESPOND MSG="waiting for bed core temperature" RESPOND MSG="soaking the bed"
HEAT_SOAK HEATER='heater_bed' TARGET={target_bed} SOAKER='temperature_sensor bed_core' SOAK_TEMP={target_bed - 5} TIMEOUT=30 CANCEL='_NOTHING' {% endif %}
# Soak until the 10 mm plate has its final shape. Measured 2026-11-02
# (Beacon mesh every 3 min, tools/soak_run.py in the 3d printer folder):
# bed 100C + chamber 50C settles ~33 min after the bed reaches target,
# bed 60C with the chamber open ~11 min. bed_core reaches target long
# before that, and swings with the PID cycle; bed_side (back edge) rises
# until the plate is settled. MIN_TIME covers the measured time, RATE
# makes a slower day (cold room) wait longer, SOAK_TEMP (70% of the bed
# target) only keeps it from ending while the bed still heats.
# CANCEL='_NOTHING': after TIMEOUT the print continues. No soak without
# a bed target (nothing to soak, MIN_TIME would only wait).
{% set soak_floor = (target_bed * 0.7) | round(1) %}
{% if target_bed <= 0 %}
{% elif target_chamber > 30 %}
HEAT_SOAK HEATER='heater_bed' TARGET={target_bed} SOAKER='temperature_sensor bed_side' SOAK_TEMP={soak_floor} RATE=0.05 RATE_SMOOTH=120 MIN_TIME=35 TIMEOUT=60 CANCEL='_NOTHING'
{% else %}
HEAT_SOAK HEATER='heater_bed' TARGET={target_bed} SOAKER='temperature_sensor bed_side' SOAK_TEMP={soak_floor} RATE=0.05 RATE_SMOOTH=120 MIN_TIME=12 TIMEOUT=30 CANCEL='_NOTHING'
{% endif %} {% endif %}
# With the chamber heated, filament in the toolhead path softens: a PLA lane # With the chamber heated, filament in the toolhead path softens: a PLA lane