Ver código fonte

Merge pull request #4933 from thinkyhead/rc_drop_pid_func_range

Squashed - Removal of PID functional range
Scott Lahteine 7 anos atrás
pai
commit
00261cbfcb
24 arquivos alterados com 40 adições e 96 exclusões
  1. 1
    3
      Marlin/Configuration.h
  2. 1
    3
      Marlin/example_configurations/Cartesio/Configuration.h
  3. 1
    3
      Marlin/example_configurations/Felix/Configuration.h
  4. 1
    3
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  5. 1
    3
      Marlin/example_configurations/Hephestos/Configuration.h
  6. 1
    3
      Marlin/example_configurations/Hephestos_2/Configuration.h
  7. 1
    3
      Marlin/example_configurations/K8200/Configuration.h
  8. 1
    3
      Marlin/example_configurations/K8400/Configuration.h
  9. 1
    3
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  10. 1
    3
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  11. 1
    3
      Marlin/example_configurations/RigidBot/Configuration.h
  12. 1
    3
      Marlin/example_configurations/SCARA/Configuration.h
  13. 1
    3
      Marlin/example_configurations/TAZ4/Configuration.h
  14. 1
    3
      Marlin/example_configurations/WITBOX/Configuration.h
  15. 1
    3
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  16. 1
    3
      Marlin/example_configurations/delta/biv2.5/Configuration.h
  17. 1
    3
      Marlin/example_configurations/delta/generic/Configuration.h
  18. 1
    3
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  19. 1
    3
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  20. 1
    3
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  21. 1
    3
      Marlin/example_configurations/makibox/Configuration.h
  22. 1
    3
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  23. 18
    29
      Marlin/temperature.cpp
  24. 0
    1
      Marlin/temperature.h

+ 1
- 3
Marlin/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active); 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/Cartesio/Configuration.h Ver arquivo

@@ -289,7 +289,7 @@
289 289
 // Comment the following line to disable PID and enable bang-bang.
290 290
 #define PIDTEMP
291 291
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
292
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
292
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
293 293
 #if ENABLED(PIDTEMP)
294 294
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
295 295
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -297,8 +297,6 @@
297 297
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
298 298
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
299 299
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
300
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
301
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
302 300
   #define K1 0.95 //smoothing factor within the PID
303 301
 
304 302
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/Felix/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // Felix 2.0+ electronics with v4 Hotend

+ 1
- 3
Marlin/example_configurations/Felix/DUAL/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // Felix 2.0+ electronics with v4 Hotend

+ 1
- 3
Marlin/example_configurations/Hephestos/Configuration.h Ver arquivo

@@ -291,7 +291,7 @@
291 291
 // Comment the following line to disable PID and enable bang-bang.
292 292
 #define PIDTEMP
293 293
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
294
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
294
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
295 295
 #if ENABLED(PIDTEMP)
296 296
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
297 297
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -299,8 +299,6 @@
299 299
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
300 300
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
301 301
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
302
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
303
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
304 302
   #define K1 0.95 //smoothing factor within the PID
305 303
 
306 304
   // Hephestos i3

+ 1
- 3
Marlin/example_configurations/Hephestos_2/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 250  // If the temperature difference between the target temperature and the actual temperature
300
-                                    // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // Tuned PID values using M303

+ 1
- 3
Marlin/example_configurations/K8200/Configuration.h Ver arquivo

@@ -295,7 +295,7 @@
295 295
 // Comment the following line to disable PID and enable bang-bang.
296 296
 #define PIDTEMP
297 297
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
298
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
298
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
299 299
 #if ENABLED(PIDTEMP)
300 300
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
301 301
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -303,8 +303,6 @@
303 303
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
304 304
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
305 305
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
306
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
307
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
308 306
   #define K1 0.95 //smoothing factor within the PID
309 307
 
310 308
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/K8400/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/K8400/Dual-head/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/RigidBot/Configuration.h Ver arquivo

@@ -291,7 +291,7 @@
291 291
 // Comment the following line to disable PID and enable bang-bang.
292 292
 #define PIDTEMP
293 293
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
294
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
294
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
295 295
 #if ENABLED(PIDTEMP)
296 296
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
297 297
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -299,8 +299,6 @@
299 299
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
300 300
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
301 301
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
302
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
303
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
304 302
   #define K1 0.95 //smoothing factor within the PID
305 303
 
306 304
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/SCARA/Configuration.h Ver arquivo

@@ -320,7 +320,7 @@
320 320
 // Comment the following line to disable PID and enable bang-bang.
321 321
 #define PIDTEMP
322 322
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
323
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
323
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
324 324
 #if ENABLED(PIDTEMP)
325 325
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
326 326
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -328,8 +328,6 @@
328 328
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
329 329
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
330 330
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
331
-  #define PID_FUNCTIONAL_RANGE 20 // If the temperature difference between the target temperature and the actual temperature
332
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
333 331
   #define K1 0.95 //smoothing factor within the PID
334 332
 
335 333
   // Merlin Hotend: From Autotune

+ 1
- 3
Marlin/example_configurations/TAZ4/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 70 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX 74 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX 74 // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 16 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/WITBOX/Configuration.h Ver arquivo

@@ -291,7 +291,7 @@
291 291
 // Comment the following line to disable PID and enable bang-bang.
292 292
 #define PIDTEMP
293 293
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
294
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
294
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
295 295
 #if ENABLED(PIDTEMP)
296 296
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
297 297
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -299,8 +299,6 @@
299 299
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
300 300
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
301 301
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
302
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
303
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
304 302
   #define K1 0.95 //smoothing factor within the PID
305 303
 
306 304
   // Witbox

+ 1
- 3
Marlin/example_configurations/adafruit/ST7565/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/delta/biv2.5/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/delta/generic/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/delta/kossel_mini/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/delta/kossel_pro/Configuration.h Ver arquivo

@@ -294,7 +294,7 @@
294 294
 // Comment the following line to disable PID and enable bang-bang.
295 295
 #define PIDTEMP
296 296
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
297
-#define PID_MAX  125 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
297
+#define PID_MAX  125 // limits current to nozzle while PID is active; 255=full current
298 298
 #if ENABLED(PIDTEMP)
299 299
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
300 300
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -302,8 +302,6 @@
302 302
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
303 303
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
304 304
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
305
-  #define PID_FUNCTIONAL_RANGE 50 // If the temperature difference between the target temperature and the actual temperature
306
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
307 305
   #define K1 0.95 //smoothing factor within the PID
308 306
 
309 307
   // Kossel Pro

+ 1
- 3
Marlin/example_configurations/delta/kossel_xl/Configuration.h Ver arquivo

@@ -281,7 +281,7 @@
281 281
 // Comment the following line to disable PID and enable bang-bang.
282 282
 #define PIDTEMP
283 283
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
284
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
284
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
285 285
 #if ENABLED(PIDTEMP)
286 286
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
287 287
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -289,8 +289,6 @@
289 289
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
290 290
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
291 291
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
292
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
293
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
294 292
   #define K1 0.95 //smoothing factor within the PID
295 293
 
296 294
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/makibox/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 1
- 3
Marlin/example_configurations/tvrrug/Round2/Configuration.h Ver arquivo

@@ -288,7 +288,7 @@
288 288
 // Comment the following line to disable PID and enable bang-bang.
289 289
 #define PIDTEMP
290 290
 #define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
291
-#define PID_MAX BANG_MAX // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
291
+#define PID_MAX BANG_MAX // limits current to nozzle while PID is active; 255=full current
292 292
 #if ENABLED(PIDTEMP)
293 293
   //#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
294 294
   //#define PID_DEBUG // Sends debug data to the serial port.
@@ -296,8 +296,6 @@
296 296
   //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
297 297
   //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
298 298
                                   // Set/get with gcode: M301 E[extruder number, 0-2]
299
-  #define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
300
-                                  // is more than PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
301 299
   #define K1 0.95 //smoothing factor within the PID
302 300
 
303 301
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it

+ 18
- 29
Marlin/temperature.cpp Ver arquivo

@@ -137,7 +137,6 @@ volatile bool Temperature::temp_meas_ready = false;
137 137
   #endif
138 138
 
139 139
   float Temperature::pid_error[HOTENDS];
140
-  bool Temperature::pid_reset[HOTENDS];
141 140
 #endif
142 141
 
143 142
 #if ENABLED(PIDTEMPBED)
@@ -195,7 +194,6 @@ uint8_t Temperature::soft_pwm[HOTENDS];
195 194
 #endif
196 195
 
197 196
 #if HAS_PID_HEATING
198
-
199 197
   void Temperature::PID_autotune(float temp, int hotend, int ncycles, bool set_result/*=false*/) {
200 198
     float input = 0.0;
201 199
     int cycles = 0;
@@ -236,13 +234,13 @@ uint8_t Temperature::soft_pwm[HOTENDS];
236 234
 
237 235
     #if HAS_PID_FOR_BOTH
238 236
       if (hotend < 0)
239
-        soft_pwm_bed = bias = d = (MAX_BED_POWER) / 2;
237
+        soft_pwm_bed = bias = d = (MAX_BED_POWER) >> 1;
240 238
       else
241
-        soft_pwm[hotend] = bias = d = (PID_MAX) / 2;
239
+        soft_pwm[hotend] = bias = d = (PID_MAX) >> 1;
242 240
     #elif ENABLED(PIDTEMP)
243
-      soft_pwm[hotend] = bias = d = (PID_MAX) / 2;
241
+      soft_pwm[hotend] = bias = d = (PID_MAX) >> 1;
244 242
     #else
245
-      soft_pwm_bed = bias = d = (MAX_BED_POWER) / 2;
243
+      soft_pwm_bed = bias = d = (MAX_BED_POWER) >> 1;
246 244
     #endif
247 245
 
248 246
     wait_for_heatup = true;
@@ -452,7 +450,6 @@ int Temperature::getHeaterPower(int heater) {
452 450
 }
453 451
 
454 452
 #if HAS_AUTO_FAN
455
-
456 453
   void Temperature::checkExtruderAutoFans() {
457 454
     const int8_t fanPin[] = { EXTRUDER_0_AUTO_FAN_PIN, EXTRUDER_1_AUTO_FAN_PIN, EXTRUDER_2_AUTO_FAN_PIN, EXTRUDER_3_AUTO_FAN_PIN };
458 455
     const int fanBit[] = {
@@ -535,23 +532,17 @@ float Temperature::get_pid_output(int e) {
535 532
   #endif
536 533
   float pid_output;
537 534
   #if ENABLED(PIDTEMP)
538
-    #if DISABLED(PID_OPENLOOP)
535
+    #if ENABLED(PID_OPENLOOP)
536
+      pid_output = constrain(target_temperature[HOTEND_INDEX], 0, PID_MAX);
537
+    #else
539 538
       pid_error[HOTEND_INDEX] = target_temperature[HOTEND_INDEX] - current_temperature[HOTEND_INDEX];
540 539
       dTerm[HOTEND_INDEX] = K2 * PID_PARAM(Kd, HOTEND_INDEX) * (current_temperature[HOTEND_INDEX] - temp_dState[HOTEND_INDEX]) + K1 * dTerm[HOTEND_INDEX];
541 540
       temp_dState[HOTEND_INDEX] = current_temperature[HOTEND_INDEX];
542
-      if (pid_error[HOTEND_INDEX] > PID_FUNCTIONAL_RANGE) {
543
-        pid_output = BANG_MAX;
544
-        pid_reset[HOTEND_INDEX] = true;
545
-      }
546
-      else if (pid_error[HOTEND_INDEX] < -(PID_FUNCTIONAL_RANGE) || target_temperature[HOTEND_INDEX] == 0) {
541
+      if (target_temperature[HOTEND_INDEX] == 0) {
547 542
         pid_output = 0;
548
-        pid_reset[HOTEND_INDEX] = true;
543
+        temp_iState[HOTEND_INDEX] = 0.0;
549 544
       }
550 545
       else {
551
-        if (pid_reset[HOTEND_INDEX]) {
552
-          temp_iState[HOTEND_INDEX] = 0.0;
553
-          pid_reset[HOTEND_INDEX] = false;
554
-        }
555 546
         pTerm[HOTEND_INDEX] = PID_PARAM(Kp, HOTEND_INDEX) * pid_error[HOTEND_INDEX];
556 547
         temp_iState[HOTEND_INDEX] += pid_error[HOTEND_INDEX];
557 548
         iTerm[HOTEND_INDEX] = PID_PARAM(Ki, HOTEND_INDEX) * temp_iState[HOTEND_INDEX];
@@ -584,8 +575,6 @@ float Temperature::get_pid_output(int e) {
584 575
           pid_output = 0;
585 576
         }
586 577
       }
587
-    #else
588
-      pid_output = constrain(target_temperature[HOTEND_INDEX], 0, PID_MAX);
589 578
     #endif //PID_OPENLOOP
590 579
 
591 580
     #if ENABLED(PID_DEBUG)
@@ -975,7 +964,7 @@ void Temperature::init() {
975 964
       setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
976 965
     #endif
977 966
     #if ENABLED(FAN_SOFT_PWM)
978
-      soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2;
967
+      soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1;
979 968
     #endif
980 969
   #endif
981 970
 
@@ -985,7 +974,7 @@ void Temperature::init() {
985 974
       setPwmFrequency(FAN1_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
986 975
     #endif
987 976
     #if ENABLED(FAN_SOFT_PWM)
988
-      soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2;
977
+      soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1;
989 978
     #endif
990 979
   #endif
991 980
 
@@ -995,7 +984,7 @@ void Temperature::init() {
995 984
       setPwmFrequency(FAN2_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
996 985
     #endif
997 986
     #if ENABLED(FAN_SOFT_PWM)
998
-      soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2;
987
+      soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1;
999 988
     #endif
1000 989
   #endif
1001 990
 
@@ -1455,15 +1444,15 @@ void Temperature::isr() {
1455 1444
 
1456 1445
       #if ENABLED(FAN_SOFT_PWM)
1457 1446
         #if HAS_FAN0
1458
-          soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2;
1447
+          soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1;
1459 1448
           WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0);
1460 1449
         #endif
1461 1450
         #if HAS_FAN1
1462
-          soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2;
1451
+          soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1;
1463 1452
           WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0);
1464 1453
         #endif
1465 1454
         #if HAS_FAN2
1466
-          soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2;
1455
+          soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1;
1467 1456
           WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0);
1468 1457
         #endif
1469 1458
       #endif
@@ -1574,15 +1563,15 @@ void Temperature::isr() {
1574 1563
     #if ENABLED(FAN_SOFT_PWM)
1575 1564
       if (pwm_count == 0) {
1576 1565
         #if HAS_FAN0
1577
-          soft_pwm_fan[0] = fanSpeedSoftPwm[0] / 2;
1566
+          soft_pwm_fan[0] = fanSpeedSoftPwm[0] >> 1;
1578 1567
           WRITE_FAN(soft_pwm_fan[0] > 0 ? 1 : 0);
1579 1568
         #endif
1580 1569
         #if HAS_FAN1
1581
-          soft_pwm_fan[1] = fanSpeedSoftPwm[1] / 2;
1570
+          soft_pwm_fan[1] = fanSpeedSoftPwm[1] >> 1;
1582 1571
           WRITE_FAN1(soft_pwm_fan[1] > 0 ? 1 : 0);
1583 1572
         #endif
1584 1573
         #if HAS_FAN2
1585
-          soft_pwm_fan[2] = fanSpeedSoftPwm[2] / 2;
1574
+          soft_pwm_fan[2] = fanSpeedSoftPwm[2] >> 1;
1586 1575
           WRITE_FAN2(soft_pwm_fan[2] > 0 ? 1 : 0);
1587 1576
         #endif
1588 1577
       }

+ 0
- 1
Marlin/temperature.h Ver arquivo

@@ -158,7 +158,6 @@ class Temperature {
158 158
       #endif
159 159
 
160 160
       static float pid_error[HOTENDS];
161
-      static bool pid_reset[HOTENDS];
162 161
     #endif
163 162
 
164 163
     #if ENABLED(PIDTEMPBED)

Carregando…
Cancelar
Salvar