I have two valves(or you can regard them as two controls) that can not be open at the same time. If they are open(true) at the same time, a error message will be popped up.
I programmed a very simple Subvi and the final value will be used to change the local variable of the operating valve(the control whose valve will be changed). But, when I put this Subvis into my main programm, it does not work because it will close both of the valve at the same time.
The reason I have operating valve and confilicting valves is that I have to check the other valve status whenever I open one of them.
Speaking only for myself I have to say that I am not sure what you need. At first I thought you where looking for an exclusive OR operation, but after looking at your VI, I am confused.
If you provided a truth table most all of the "frequent Flyers" here could probably fire off an answer.
I tried your program. It still does not work perfectly. If a is true, when I turn on b, I can not turn on it, that's right. But, I should not turn off a at the same time.
I change a little on your code. Can you take a look at it?