intelligent-agent / redeem

Firmware for Replicape
http://wiki.thing-printer.com/index.php?title=Redeem
GNU General Public License v3.0
36 stars 44 forks source link

M109 doesn't wait for temperature to stabilize #61

Open jakep82 opened 6 years ago

jakep82 commented 6 years ago

When issuing an M109 at the start of a print, Redeem releases the wait as soon as the temperature reaches the set point. The PID algorithm currently has issues, and I'm experiencing as much as 25 degrees of overshoot during warmup. Because M109 releases the wait the instant the set temperature is reached, my prints start with the hotend more than 20 degrees above my set temperature. I've been instructed on gcode hacks to get around this (extra M109 in start gcode with lower set temp), but it's not a proper solution.

While I understand work is happening to reduce the PID overshoot, M109 shouldn't release the wait until the temperature remains within a sane range of the set value (+/- 2 degrees?) for a reasonable length of time (5 seconds?)

darylbond commented 6 years ago

Heater already has a function available is_temperature_stable(seconds=10) that does this check, do we simply want to replace the is_target_temperature_reached() call in M116 with this function?

Wackerbarth commented 6 years ago

_stable sounds good to me. The only other use of temperature that I see is "at or above" to lock out "cold extrusion" and "at or below" to stop monitoring when shutting down. Both of these can be handled outside of the Heater object.

darylbond commented 6 years ago

For how long should we require the temperature to be stable? Default for is_temperature_stable is 10 sec but I feel something like 3 sec is more appropriate.

jakep82 commented 6 years ago

From my point of view, something in the range of 3-5 seconds seems appropriate.