I have created simplified VI for the problem I have:
Lets call this Vi valve opening program (that's what I am going to use it for).
This program should have two mode of operations: manual and automatic.
In manual (constant) mode it just opens valve (BIG GREEN LED) periodically for some period of time. You can try it changing switch from Auto to Constant mode. It works as I would like it to be.
Now Auto mode: It should start valve opening procedure when pressure is above some limit, again you can try it by changing switch from Constant to Auto mode and adjusting either pressure knob or "BF start level". This part of the program does not work as I need.
Because it is feedback, in real life the pressure coud rise above the START level and then drop back during valve opening, it means that Valve opening procedure stops to work (you can check it by changing pressure from level above start level to level below it at the moment when LED is lit). I need it to continue to work in the same manner as in a constant mode: when it starts valve opening cycle it should finish it no matter what the pressure is and it should repeat itself after that cycle only if the pressure is still high.
Thanks. Sergey.