
adccommunitymod (AutomationDirect) asked a question.
PID initialization mode
Created Date: April 30,2019
Created By: TheGreatMarklar
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
Is there a way to change the PID initialization mode during runtime? I can't find a bit as part of the structure. Currently, I have 2 PID blocks, controlled by an input contact, but the Code Check flags the loops with a warning that I'm using a single PID in 2 different PID blocks, even though they can't run at the same time.
Created Date: April 30,2019
Created by: TheGreatMarklar
Is there a way to change the PID initialization mode during runtime? I can't find a bit as part of the structure.
Currently, I have 2 PID blocks, controlled by an input contact, but the Code Check flags the loops with a warning that I'm using a single PID in 2 different PID blocks, even though they can't run at the same time.
Created Date: April 30,2019
Created by: BobO
Nothing wrong with having two instructions, we 're just warning because you may be messing up. Just suppress the warning.
Created Date: April 30,2019
Created by: franji1
What is the reason for using the same PID structure twice? Yes, you CAN do it (like re-using a Timer structure, do-able but not recommended). Is this for a common HMI or something like that?
Realize when you say "run at the same time ", that does NOT mean the input legs are mutually exclusive. The Input leg on a PID instruction dictates AUTO vs. MANUAL mode, not RUN vs. NOT run (PID instructions ALWAYS are running, even when the input leg is OFF). Hence, that means that the two PID instructions must NEVER run IN THE SAME PLC SCAN, i.e. they are in separate code blocks or possibly separate stages THAT ARE NEVER ENABLED AT THE SAME TIME. But if they both run on the same PLC scan, then the LAST ONE that runs will set the MODE of THAT PID structure (i.e. auto vs. manual).
I think if you tell us WHY you want to utilize the same PID structure, that can help us answer the actual behavior you are looking for.
Created Date: April 30,2019
Created by: TheGreatMarklar
What is the reason for using the same PID structure twice? Yes, you CAN do it (like re-using a Timer structure, do-able but not recommended). Is this for a common HMI or something like that?
Realize when you say "run at the same time ", that does NOT mean the input legs are mutually exclusive. The Input leg on a PID instruction dictates AUTO vs. MANUAL mode, not RUN vs. NOT run (PID instructions ALWAYS are running, even when the input leg is OFF). Hence, that means that the two PID instructions must NEVER run IN THE SAME PLC SCAN, i.e. they are in separate code blocks or possibly separate stages THAT ARE NEVER ENABLED AT THE SAME TIME. But if they both run on the same PLC scan, then the LAST ONE that runs will set the MODE of THAT PID structure (i.e. auto vs. manual).
I think if you tell us WHY you want to utilize the same PID structure, that can help us answer the actual behavior you are looking for.
Our equipment is controlled by a single PID loop. On Startup, I require bumpless transfer to initialize the loop. When switching from manual to auto while running, I need SP set to PV only, no modification of the CV.
Created Date: April 30,2019
Created by: BobO
Nothing wrong with having two instructions, we 're just warning because you may be messing up. Just suppress the warning.
Oops...I guess I stepped in it with this. Franj is correct. You can still accomplish the same thing, but would need to put the two instructions into mutually exclusive TASK blocks.