-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extra max-temp safety checks #13756
Add extra max-temp safety checks #13756
Conversation
- Would just show "BED" for bed msg, rather than "BED <msg>" - Would use MSG_E1 for both E0 and E1 - Renamed TEMP_ERR_PSTR to TEMP_PSTR - MSG_COOLING and MSG_HEATING now use the TEMP_PSTR macro for consistency
It really isn't clear whether MAXTEMP is supposed to be the highest temperature the printer is supposed to reach, or a dangerously high temperature that can only be triggered during a fault. The config file says "above this temperature the heater will be switched off" which is less urgent than "OMG! My hair is on fire!". Traditionally Lulzbot has used MAXTEMP for the latter, but perhaps this was a misunderstanding on our part or maybe the intent has changed in Marlin over time? I have decided to add two new configuration options, HEATER_KILL_TEMP and BED_KILL_TEMP. We can use this on our printers to get the behavior we are accustomed to, while others can choose to enable it or not. These new configuration options also have an advantage over more sophisticated checks in that they are easily testable by using fake thermistors (i.e. resistors), which is good for quick testing in a production line. |
- Readings above these temperatures will cause the printer to immediately halt.
5ac24dd
to
3dd0fb7
Compare
Makes more than sense |
@marcio-ao .. Thats better... |
Alternatives might be to have the HEATER_KILL_TEMP be some fixed delta above the MAX of the the individual HEATER_MAXTEMP, so choosing a value would not be necessary. |
Delta can be done in configuration.h. |
Hum? I mean a ΔT, not a delta printer. |
Because you can only set the temperature using the LCD to |
@ManuelMcLure: Yes, I think this is what the current implementation does, but it isn't particularly intuitive. This is what I think it looks like now:
To me, the most important parameter from a user's perspective is the maximum temperature they intend to print at. They should be able to set that temperature directly and the LCD and GCODE should allow the temp to be set up to that value. If the thermistor detected a temperature above that value, the heaters should be turned off; but the printer would remain operational, to account for possible overshoot in PID. At some even higher temperature, the printer would kill itself. It could look like this:
Alas, this doing this change to the meaning of MAX_TEMP would mess everybody's config, so this PR leaves MAX_TEMP as is and adds KILL_TEMP. We end up with something like this:
|
I think currently nothing special happens between |
Yes.... The differences: |
MAX TEMP-15 -- MAX TEMP : Space for Temp OverShoot I think its better to have KILL TEMP to turn printer off. |
If you turn off the heater after a 15C overshoot it means your PIDs are very bad and it's pretty much assured that your print is ruined anyway, so I don't see why you wouldn't take the safer option of killing the printer. |
I do agree that the naming is confusing. I'd much prefer |
@ManuelMcLure you are correct too.... Maybe still need more work, but it is better and safer to turn off printer at some point. |
|
Try setting a hotend or the bed to use one of the dummy thermistors, then set the dummy thermistor temperature to be higher than the max temperature for the hotend or the bed. This can be used to test what happens when the machine boots or is running in the idle loop with an out-of-range temperature reading. |
As detailed elsewhere, the |
Marlin/src/module/temperature.cpp
Outdated
#else | ||
ui.set_status_P(heating ? PSTR("E " MSG_HEATING) : PSTR("E " MSG_COOLING)); | ||
#endif | ||
ui.set_status_P(heating ? TEMP_PSTR(MSG_HEATING, e) : TEMP_PSTR(MSG_COOLING, e)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect this to bloat the size of the binary more than the original code because it produces up to 12 PROGMEM strings where the previous code only generates 2 no matter how many hotends are present.
Marlin/src/module/temperature.cpp
Outdated
@@ -86,17 +86,17 @@ Temperature thermalManager; | |||
*/ | |||
|
|||
#if HAS_HEATED_BED | |||
#define _BED_PSTR(E) (E) == -1 ? PSTR(MSG ## _BED) : | |||
#define _BED_PSTR(M,E) (E) == -1 ? PSTR(MSG_BED " " M) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend not to do this kind of appending of strings because in some languages the order of subject-object-modifier is completely different, and we don't want to impose our English-centric word ordering on everyone. That is why the intent here was to concatenate to get the right translation string name and use the translated string which has the correct word-ordering.
Marlin/src/module/temperature.cpp
Outdated
#endif | ||
#define _E_PSTR(M,E,N) (HOTENDS >= (N) && (E) == (N)-1) ? PSTR(MSG_E##N " " M) : | ||
#define TEMP_ERR_PSTR(M,E) _BED_PSTR(E) _CHAMBER_PSTR(E) _E_PSTR(M,E,2) _E_PSTR(M,E,3) _E_PSTR(M,E,4) _E_PSTR(M,E,5) _E_PSTR(M,E,6) PSTR(MSG_E1 " " M) | ||
#define TEMP_PSTR(M,E) _BED_PSTR(M,E) _CHAMBER_PSTR(M,E) _E_PSTR(M,E,2) _E_PSTR(M,E,3) _E_PSTR(M,E,4) _E_PSTR(M,E,5) _E_PSTR(M,E,6) PSTR(MSG_E0 " " M) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is important to note that "E1" is the first extruder when displayed to the user, not "E0" as it is named in the code.
ef21c31
to
143f58d
Compare
@thinkyhead , I cannot compile this PR. |
Followup to MarlinFirmware#13756
I fixed a few errors that rendered the temperature error messages incomplete.
I implemented and tested the BED_MAXTEMP suggestion in #13711, but decided to make the checks optional and called them HEATER_KILL_TEMP and BED_KILL_TEMP.
I also changed the MSG_COOLING and MSG_HEATING to use the same macro (now renamed TEMP_PSTR). This allows those messages to use the
MSG_E##n
strings for consistency with everything else.