I'm working in implementing a bias into logic for a Compactlogix PLC using the PID instruction. I have it close to working but there's one part that seems like it could be an issue.
Basically I want to move the PID output to zero when an event occurs. I added a bit for the event, a one shot, and then I calculate the BIAS. BIAS = BIAS - PID.CV.
For the most part this works ok. If I'm at 35% out and the event occurs the BIAS becomes -35, the output moves to zero and the loop keeps running.
The potential problem I see is that the BIAS is additive. So if the event occurs and the BIAS becomes say -35 and then the loop controls for a while and works itself back up to 40% out and the event occurs again the BIAS is now -75%. Again it still works properly, but if this happens hundreds or thousands of times can it cause a problem?
I did add logic that clears the .BIAS when the loop goes into manual which should minimize the odds that it becomes a major problem.
Anyone have a better way to do this?
Basically I want to move the PID output to zero when an event occurs. I added a bit for the event, a one shot, and then I calculate the BIAS. BIAS = BIAS - PID.CV.
For the most part this works ok. If I'm at 35% out and the event occurs the BIAS becomes -35, the output moves to zero and the loop keeps running.
The potential problem I see is that the BIAS is additive. So if the event occurs and the BIAS becomes say -35 and then the loop controls for a while and works itself back up to 40% out and the event occurs again the BIAS is now -75%. Again it still works properly, but if this happens hundreds or thousands of times can it cause a problem?
I did add logic that clears the .BIAS when the loop goes into manual which should minimize the odds that it becomes a major problem.
Anyone have a better way to do this?