Dustin,
Can you use that method to get 2+ PIDE functions back on track with each other? For example: I have several independent PIDE functions on separate PLC's, but they are looking at the same calculation. Due to noise or communication failures these PIDE function might slightly drift apart. I want to once an hour average out their CVEU and get them back to similar outputs. This is also important because if our network goes down the chances of these PID's drifting apart is very likely.
Thank you,
Josh
Hi Josh,
Yes I suppose you could do that. If you had some baseline CV value that you wanted to "reset" all your PID's to, then you could send a request over the network to reset all the CV's to that value. Or you could have that coded into the PLC's to execute the "CVInitReq" at a specific interval.
I'm not sure exactly what it is you are trying to do. You say you have several PIDE's on different PLC's and you are concerned about them drifting apart. What kind of network are they all on? Are you wanting to average the CVEU's of all the PIDE's over an hour, then write that value back to all the PIDE's after the averaging algorithm is completed? If so, you may see a significant PV bump in some of your PIDE's, depending on how far a particular CV is off from the group average.
If you are just wanting to write a baseline constant CV to all your PIDE's once an hour, then this would be easier to execute, but I still don't see the benefit, but I can see plenty of potential drawbacks. But you know your process, and I don't.
Seems to me, if you have similar processes on different machines that require significantly different CV's to maintain the same setpoint, then there are disturbances in your system that aren't properly accounted for.
Back to your question: Say process analysis shows that your process runs at setpoint under normal conditions with a CV of 75%. Due to process variations, you know that these CV's may drift a bit over time, but it is crucial that all the CV's be "brought back in line" once an hour. Normally, you rely on your plant network to share information between PLC's, but you don't trust the network with the task of re-initializing the CV's, since your IT guy is fresh out of school and the network has been known to fail at the worst possible times.
So you want the re-initialization routine to reside in each of your PLC's and to be carried out once an hour, ideally simultaneously. Here's how I would do that:
Set-up a periodic task, with a period of 1000 ms (one second). In that task, have an unconditional ADD instruction on the first rung. This will be your scan "counter".
Use a DINT rather than an actual counter because the CTU instruction requires false-to-true transitions. When Scan_Counter = 3600, move your baseline value to "CVInitValue", and OTE "CVInitReq", then clear Scan_Counter.
Code would look something like this:
Code:
SOR SBR ADD Scan_Counter 1 Scan_Counter EOR
SOR EQU Scan_Counter 3600 MOV Base_CV MyPIDE.CVinitValue OTE MyPIDE.CVInitReq CLR Scan_Counter EOR
You would have to make sure that the PIDE routine is called after the CVInitReq is set, but before the next time the periodic task is called. You could also do the above code in your FBD where the PIDE is executed. Depending on the update rate, you may have to adjust the value of Scan_Counter before performing the initialization routine.
To keep all the PIDE's in sync across the plant, you could send out a "Scan_Counter_Reset" request across the network once daily. It would zero out all the counters simultaneously to eliminate any drift that had occurred over the previous 24-hour period. That way, the network keeps everything exactly in sync, but if the network fails, you still keep the PIDE's resetting once an hour on roughly the same schedule.
Hope this helps.
Cheers,
Dustin