Is the PID settings fixed??????????
I have build a brewsystem based on 2.8.3.RC
Ran a testrun with water yesterday to tune the PID.
After several hours, many parameter changes, I'm not able to get this correct.
I ending the regulation severel degreed below setpoint every time, the higher setpoint the higer offset.
I looked at the code and have a question regarding some of the code.
Is the PID parameters read from eeprom other places than in the function listet below?
Find it odd that this is been commented out
void load_pid_settings () {
//byte eepromKp = r_set(1);
//byte eepromKi = r_set(2);
//byte eepromKd = r_set(3);
//byte SampleTime = r_set(4);
//r_set(eepromKp, 1);
//r_set(eepromKi, 2);
//r_set(eepromKd, 3);
//myPID.SetTunings(eepromKp - 100, (double)((eepromKi - 100.00) / 250.00), eepromKd - 100); // send the PID settings to the PID
myPID.SetTunings(r_set(1) - 100, (double)((r_set(2) - 100.00) / 250.00), r_set(3) - 100); // send the PID settings to the PID
//r_set(SampleTime, 4);
//r_set(WindowSize, 5);
WindowSize = r_set(5);
//myPID.SetOutputLimits(0.0, 255.0);
//myPID.SetSampleTime(SampleTime * 250);
myPID.SetSampleTime(r_set(4) * 250);
}
In the definition section I find this code:
PID myPID(&Input, &Output, &Setpoint, 100, 40, 0, DIRECT);
Does this add up to that the PID has been changed to a fixed setting???