Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: ksasikumar on April 06, 2023, 05:50:46 PM
-
Hello! I am using a few PID loops to control temperature in a room. When the temperature is below a setpoint, the Heating PID is enabled. When the temperature is above the setpoint, the Cooling PID is enabled. I have been running into an issue where the PID mode does NOT change from Auto to Manual when the PID is no longer enabled. Basically, the rung with the PID instruction is no longer energized, but the PID mode stays in Auto mode instead of changing to Manual mode. Does anyone know what could be causing this? Is there any way to force the PID mode to turn off/on?
-
You really need to read the help topic on PID operations if you haven't already. Most of this is answered there.
-
I have read the help topic. That's why I'm here. This is what the help topic says about Auto/Manual mode:
"The PID Loop's mode (Auto or Manual) is controlled by the power-flow of the PID instruction's single ladder logic input labeled (A/M) (Auto mode / Manual mode).
If the input logic is ON, the PID instruction is enabled and the loop's Mode is set to Auto. In Auto mode the loop runs the PID calculation to generate new .Output value every Sample Time interval.
If the input is OFF, the loop's Mode is set to Manual. In Manual mode the loop IS NOT running the PID calculation, meaning the .Output value remains unchanged by the loop. While the PID loop is in Manual mode it is expected that an operator or other intelligent source is manually controlling the output by observing the PV and writing data to .Output as necessary to keep the process under control."
So my question is why is the PID instruction enabled (Auto Mode) if the input logic is OFF?
-
Looks like your PID instruction is in a stage. I'd wager that the stage is disabled, so the instruction isn't being executed.
-
Yes I am using stage programming. But the stage is not enabled, the input logic is off, but the PID is still in Auto mode.
-
Yes I am using stage programming. But the stage is not enabled, the input logic is off, but the PID is still in Auto mode.
Right, that's what I'm explaining. When the stage is off, the code contained in the stage isn't executed, meaning, the PID instruction never runs, auto or manual. For the PID instruction to function correctly it must be in a stage or code block that is running every scan.
-
And maybe this wasn't clear, but when the instruction doesn't run, the structure state is never updated. It says "Auto" because that's what it was last time the instruction was executed.
-
I see. I added a delay to make sure the PID was in Manual mode before exiting a stage. Thank you!
-
I see. I added a delay to make sure the PID was in Manual mode before exiting a stage. Thank you!
Rather than use a timer, use the .Mode bit. If will be ON if in Auto, OFF if in Manual. So just do a NC contact of the .Mode bit to JMP (i.e. JMP once it's in Manual, in addition to whatever other condition you were testing to JMP other than the timer)
-
Why two separate PIDs for heating and cooling instead of splitting the CV from one PID into heating, cooling and probably deadband ranges? Need different gains I assume?
-
Just adding to Control Guy's comment:
Have you tried the LERP instruction? You can use a couple of those to split the loop's output into two physical outputs. I always cheer when I get the opportunity to LERP :D