Browse Source

Merge pull request #3653 from thinkyhead/rc_bed_temp_watch_merge

Introduce temp watch protection for the bed
Scott Lahteine 8 years ago
parent
commit
60c6efb75c

+ 13
- 3
Marlin/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/Hephestos_2/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -86,13 +86,23 @@
86 86
 #endif
87 87
 
88 88
 /**
89
- * Thermal Protection parameters for the bed
90
- * are like the above for the hotends.
91
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
89
+ * Thermal Protection parameters for the bed are just as above for hotends.
92 90
  */
93 91
 #if ENABLED(THERMAL_PROTECTION_BED)
94 92
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
95 93
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
94
+
95
+  /**
96
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
97
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
98
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
99
+   * but only if the current temperature is far enough below the target for a reliable test.
100
+   *
101
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
102
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
103
+   */
104
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
105
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
96 106
 #endif
97 107
 
98 108
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/RigidBot/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/TAZ4/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/delta/biv2.5/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 120   // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 4 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/delta/kossel_pro/Configuration_adv.h View File

@@ -85,13 +85,23 @@
85 85
 #endif
86 86
 
87 87
 /**
88
- * Thermal Protection parameters for the bed
89
- * are like the above for the hotends.
90
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
88
+ * Thermal Protection parameters for the bed are just as above for hotends.
91 89
  */
92 90
 #if ENABLED(THERMAL_PROTECTION_BED)
93 91
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
94 92
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
93
+
94
+  /**
95
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
96
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
97
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
98
+   * but only if the current temperature is far enough below the target for a reliable test.
99
+   *
100
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
101
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
102
+   */
103
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
104
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
95 105
 #endif
96 106
 
97 107
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/delta/kossel_xl/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 13
- 3
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -80,13 +80,23 @@
80 80
 #endif
81 81
 
82 82
 /**
83
- * Thermal Protection parameters for the bed
84
- * are like the above for the hotends.
85
- * WATCH_TEMP_BED_PERIOD and WATCH_TEMP_BED_INCREASE are not imlemented now.
83
+ * Thermal Protection parameters for the bed are just as above for hotends.
86 84
  */
87 85
 #if ENABLED(THERMAL_PROTECTION_BED)
88 86
   #define THERMAL_PROTECTION_BED_PERIOD 20    // Seconds
89 87
   #define THERMAL_PROTECTION_BED_HYSTERESIS 2 // Degrees Celsius
88
+
89
+  /**
90
+   * Whenever an M140 or M190 increases the target temperature the firmware will wait for the
91
+   * WATCH_BED_TEMP_PERIOD to expire, and if the temperature hasn't increased by WATCH_BED_TEMP_INCREASE
92
+   * degrees, the machine is halted, requiring a hard reset. This test restarts with any M140/M190,
93
+   * but only if the current temperature is far enough below the target for a reliable test.
94
+   *
95
+   * If you get too many "Heating failed" errors, increase WATCH_BED_TEMP_PERIOD and/or decrease
96
+   * WATCH_BED_TEMP_INCREASE. (WATCH_BED_TEMP_INCREASE should not be below 2.)
97
+   */
98
+  #define WATCH_BED_TEMP_PERIOD 60                // Seconds
99
+  #define WATCH_BED_TEMP_INCREASE 2               // Degrees Celsius
90 100
 #endif
91 101
 
92 102
 #if ENABLED(PIDTEMP)

+ 43
- 4
Marlin/temperature.cpp View File

@@ -200,11 +200,16 @@ static float analog2temp(int raw, uint8_t e);
200 200
 static float analog2tempBed(int raw);
201 201
 static void updateTemperaturesFromRawValues();
202 202
 
203
-#if ENABLED(THERMAL_PROTECTION_HOTENDS)
203
+#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
204 204
   int watch_target_temp[EXTRUDERS] = { 0 };
205 205
   millis_t watch_heater_next_ms[EXTRUDERS] = { 0 };
206 206
 #endif
207 207
 
208
+#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
209
+  int watch_target_bed_temp = 0;
210
+  millis_t watch_bed_next_ms = 0;
211
+#endif
212
+
208 213
 #ifndef SOFT_PWM_SCALE
209 214
   #define SOFT_PWM_SCALE 0
210 215
 #endif
@@ -717,7 +722,7 @@ void manage_heater() {
717 722
     if (ct < max(HEATER_0_MINTEMP, 0.01)) min_temp_error(0);
718 723
   #endif
719 724
 
720
-  #if ENABLED(THERMAL_PROTECTION_HOTENDS) || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN
725
+  #if (ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0) || (ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0) || DISABLED(PIDTEMPBED) || HAS_AUTO_FAN
721 726
     millis_t ms = millis();
722 727
   #endif
723 728
 
@@ -734,7 +739,7 @@ void manage_heater() {
734 739
     soft_pwm[e] = current_temperature[e] > minttemp[e] && current_temperature[e] < maxttemp[e] ? (int)pid_output >> 1 : 0;
735 740
 
736 741
     // Check if the temperature is failing to increase
737
-    #if ENABLED(THERMAL_PROTECTION_HOTENDS)
742
+    #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
738 743
 
739 744
       // Is it time to check this extruder's heater?
740 745
       if (watch_heater_next_ms[e] && ELAPSED(ms, watch_heater_next_ms[e])) {
@@ -751,6 +756,24 @@ void manage_heater() {
751 756
 
752 757
     #endif // THERMAL_PROTECTION_HOTENDS
753 758
 
759
+    // Check if the temperature is failing to increase
760
+    #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
761
+
762
+      // Is it time to check the bed?
763
+      if (watch_bed_next_ms && ELAPSED(ms, watch_bed_next_ms)) {
764
+        // Has it failed to increase enough?
765
+        if (degBed() < watch_target_bed_temp) {
766
+          // Stop!
767
+          _temp_error(-1, PSTR(MSG_T_HEATING_FAILED), PSTR(MSG_HEATING_FAILED_LCD));
768
+        }
769
+        else {
770
+          // Start again if the target is still far off
771
+          start_watching_bed();
772
+        }
773
+      }
774
+
775
+    #endif // THERMAL_PROTECTION_HOTENDS
776
+
754 777
     #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)
755 778
       if (fabs(current_temperature[0] - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) {
756 779
         _temp_error(0, PSTR(MSG_REDUNDANCY), PSTR(MSG_ERR_REDUNDANT_TEMP));
@@ -1160,7 +1183,7 @@ void tp_init() {
1160 1183
   #endif //BED_MAXTEMP
1161 1184
 }
1162 1185
 
1163
-#if ENABLED(THERMAL_PROTECTION_HOTENDS)
1186
+#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
1164 1187
   /**
1165 1188
    * Start Heating Sanity Check for hotends that are below
1166 1189
    * their target temperature by a configurable margin.
@@ -1176,6 +1199,22 @@ void tp_init() {
1176 1199
   }
1177 1200
 #endif
1178 1201
 
1202
+#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
1203
+  /**
1204
+   * Start Heating Sanity Check for hotends that are below
1205
+   * their target temperature by a configurable margin.
1206
+   * This is called when the temperature is set. (M140, M190)
1207
+   */
1208
+  void start_watching_bed() {
1209
+    if (degBed() < degTargetBed() - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) {
1210
+      watch_target_bed_temp = degBed() + WATCH_BED_TEMP_INCREASE;
1211
+      watch_bed_next_ms = millis() + (WATCH_BED_TEMP_PERIOD) * 1000UL;
1212
+    }
1213
+    else
1214
+      watch_bed_next_ms = 0;
1215
+  }
1216
+#endif
1217
+
1179 1218
 #if ENABLED(THERMAL_PROTECTION_HOTENDS) || ENABLED(THERMAL_PROTECTION_BED)
1180 1219
 
1181 1220
   void thermal_runaway_protection(TRState* state, millis_t* timer, float temperature, float target_temperature, int heater_id, int period_seconds, int hysteresis_degc) {

+ 12
- 3
Marlin/temperature.h View File

@@ -128,17 +128,26 @@ FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; }
128 128
 FORCE_INLINE float degTargetHotend(uint8_t extruder) { return target_temperature[extruder]; }
129 129
 FORCE_INLINE float degTargetBed() { return target_temperature_bed; }
130 130
 
131
-#if ENABLED(THERMAL_PROTECTION_HOTENDS)
131
+#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
132 132
   void start_watching_heater(int e = 0);
133 133
 #endif
134 134
 
135
+#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
136
+  void start_watching_bed();
137
+#endif
138
+
135 139
 FORCE_INLINE void setTargetHotend(const float& celsius, uint8_t extruder) {
136 140
   target_temperature[extruder] = celsius;
137
-  #if ENABLED(THERMAL_PROTECTION_HOTENDS)
141
+  #if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
138 142
     start_watching_heater(extruder);
139 143
   #endif
140 144
 }
141
-FORCE_INLINE void setTargetBed(const float& celsius) { target_temperature_bed = celsius; }
145
+FORCE_INLINE void setTargetBed(const float& celsius) {
146
+  target_temperature_bed = celsius;
147
+  #if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
148
+    start_watching_bed();
149
+  #endif
150
+}
142 151
 
143 152
 FORCE_INLINE bool isHeatingHotend(uint8_t extruder) { return target_temperature[extruder] > current_temperature[extruder]; }
144 153
 FORCE_INLINE bool isHeatingBed() { return target_temperature_bed > current_temperature_bed; }

+ 12
- 2
Marlin/ultralcd.cpp View File

@@ -603,7 +603,7 @@ void lcd_set_home_offsets() {
603 603
 /**
604 604
  * Watch temperature callbacks
605 605
  */
606
-#if ENABLED(THERMAL_PROTECTION_HOTENDS)
606
+#if ENABLED(THERMAL_PROTECTION_HOTENDS) && WATCH_TEMP_PERIOD > 0
607 607
   #if TEMP_SENSOR_0 != 0
608 608
     void watch_temp_callback_E0() { start_watching_heater(0); }
609 609
   #endif
@@ -631,6 +631,16 @@ void lcd_set_home_offsets() {
631 631
   #endif // EXTRUDERS > 3
632 632
 #endif
633 633
 
634
+#if ENABLED(THERMAL_PROTECTION_BED) && WATCH_BED_TEMP_PERIOD > 0
635
+  #if TEMP_SENSOR_BED != 0
636
+    void watch_temp_callback_bed() { start_watching_bed(); }
637
+  #endif
638
+#else
639
+  #if TEMP_SENSOR_BED != 0
640
+    void watch_temp_callback_bed() {}
641
+  #endif
642
+#endif
643
+
634 644
 /**
635 645
  *
636 646
  * "Tune" submenu
@@ -685,7 +695,7 @@ static void lcd_tune_menu() {
685 695
   // Bed:
686 696
   //
687 697
   #if TEMP_SENSOR_BED != 0
688
-    MENU_MULTIPLIER_ITEM_EDIT(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15);
698
+    MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &target_temperature_bed, 0, BED_MAXTEMP - 15, watch_temp_callback_bed);
689 699
   #endif
690 700
 
691 701
   //

Loading…
Cancel
Save