mylespetro
Member
What platform?
Here is what I have done in the past. Assumed two solenoids, Ladder Logic:
Network1: Create a 2.0 second self resetting timer.
Network2: If flow < setpoint, and Timer.Q energize Open Output.
Network2: If flow > setpoint, and Timer.Q energize Close Output.
You may have to change the timer to fit your situation.
Every time the timer "done" bit is true, the output will be energized for 1 scan.
You may have to add a deadband to you setpoint. So that when is "close" you do nothing.
I think the deadband could be achieved using two LIM instructions, essentially if flow is between your lower deadband and say -1000 (essentially negative infinity depending on the scaling, I’m imagining controlling the flow between 0-10 GPM or something), then open the valve, and vice versa for the upper deadband and +1000. I’ve done this for high and low level detection, you may have to reverse the direction of the LIM instruction, I cant’t remember the normal operation. I think normally it operates such that if your “Test” value is between your Upper Limit and Lower Limit values, it evaluates as True but if you have your Upper and Lower Limit values swapped (eg. upper limit of 0 and lower limit of 100) then it will be false until it goes outside of the range between the two. Two LIM instructions are needed to cover both situations of the low or high flow compared to the setpoint.