Add PID functional range setting. With high powered heaters the current functional range of 10 degrees causes high overshoots as the PID needs to kick in before the temperature hits 10 degrees below target.
This commit is contained in:
parent
5ff5cee8ce
commit
55ba90ac19
2 changed files with 5 additions and 3 deletions
|
|
@ -319,11 +319,11 @@ void manage_heater()
|
|||
|
||||
#ifndef PID_OPENLOOP
|
||||
pid_error[e] = target_temperature[e] - pid_input;
|
||||
if(pid_error[e] > 10) {
|
||||
if(pid_error[e] > PID_FUNCTIONAL_RANGE) {
|
||||
pid_output = PID_MAX;
|
||||
pid_reset[e] = true;
|
||||
}
|
||||
else if(pid_error[e] < -10) {
|
||||
else if(pid_error[e] < -PID_FUNCTIONAL_RANGE) {
|
||||
pid_output = 0;
|
||||
pid_reset[e] = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue