Hello everyone. I am trying to figure out what the best way to control three pumps would be. I have searched the forums and cannot seem to find what I am looking for, so I will be as detailed as I can. The two attached files are pdf and the test "works", but does not increment, which I believe some math would take care of. However, I am looking for a simpler(sp?) and more streamlined way of do this.
Issue: Control 3 pumps in rotation.
Rotation: Lead, Lag, Lag2.
Control Tank calls for pumps, based on level setpoints. Lead is called, if unable maintain, lag is called, and if still dropping lag 2 is called.
Once level is met for the respective set point, the pumps turn off and rotate.
I am using 3 counters to keep track of the pumps rotation status.
My current crappy code is rotating mostly working like I want. I am forcing a position change if one of the pumps becomes unavailable. However, when the pump becomes available again, I am looking back at my original counter, which is not set to increment, so the pumps go back to their original position. I do not like this method at all and I am just not smart enough to figure it out. My preference is to have the pumps rotate normally, but if a pump is removed from service, the system will operate in a lead, lag operation, but when the 3rd pump comes back into service, it will hop back into rotation. Caveat, I need to always have them rotate in a lead, lag, lag 2(if available) sequence. For example, the operation would be L, Lg, Lg2, rotate after lead call drop, L2, L, Lg and so on. Lets say pump 1 is down down for maintenance, the L and Lg would rotate between 2 and 3, but when pump 1 came back online, it would find its place in the correct order. There are other things in the code, which may be left over from trying a bunch of different ways to achieve what I want.
Pump 1 rotation counter: C5:3, using the acc
Pump 2 rotation counter: C5:4, using the acc
Pump 3 rotation counter: C5:4, using the acc
I am moving the acc of each counter to N10:40, 41, and 42 respectively.
I hope the above word salad is somewhat coherent, if not, please let me know. If anyone has any examples of what I am trying to accomplish or can point me to a good resource for this, please let me know.
Thank you
Issue: Control 3 pumps in rotation.
Rotation: Lead, Lag, Lag2.
Control Tank calls for pumps, based on level setpoints. Lead is called, if unable maintain, lag is called, and if still dropping lag 2 is called.
Once level is met for the respective set point, the pumps turn off and rotate.
I am using 3 counters to keep track of the pumps rotation status.
My current crappy code is rotating mostly working like I want. I am forcing a position change if one of the pumps becomes unavailable. However, when the pump becomes available again, I am looking back at my original counter, which is not set to increment, so the pumps go back to their original position. I do not like this method at all and I am just not smart enough to figure it out. My preference is to have the pumps rotate normally, but if a pump is removed from service, the system will operate in a lead, lag operation, but when the 3rd pump comes back into service, it will hop back into rotation. Caveat, I need to always have them rotate in a lead, lag, lag 2(if available) sequence. For example, the operation would be L, Lg, Lg2, rotate after lead call drop, L2, L, Lg and so on. Lets say pump 1 is down down for maintenance, the L and Lg would rotate between 2 and 3, but when pump 1 came back online, it would find its place in the correct order. There are other things in the code, which may be left over from trying a bunch of different ways to achieve what I want.
Pump 1 rotation counter: C5:3, using the acc
Pump 2 rotation counter: C5:4, using the acc
Pump 3 rotation counter: C5:4, using the acc
I am moving the acc of each counter to N10:40, 41, and 42 respectively.
I hope the above word salad is somewhat coherent, if not, please let me know. If anyone has any examples of what I am trying to accomplish or can point me to a good resource for this, please let me know.
Thank you
Last edited: