LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

two mutual exclusive condition

Hello:

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.

Can anyone help me for the attached programm?

Thanks a million,
0 Kudos
Message 1 of 9
(3,463 Views)
Hi Connector,

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.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 9
(3,463 Views)
Hi, Ben:

Here are the truth table:

Operating Valve Conflicting Valve HS Final status
t t t t
t t f f
t f t t
t f f t
f t t f
f t f f
f f t f
f f f f


Thanks a lot
0 Kudos
Message 3 of 9
(3,463 Views)
A quick Venn diagram, some boolean arithetic...

See attached,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 9
(3,462 Views)
Hello Ben:

Thanks for your help. I figure out to use this also, but How can I pop up a message to tell the operator that this operation is not valid?

have a nice day
0 Kudos
Message 5 of 9
(3,462 Views)
Use an AND gate to drive a case structure with you one-button dialog.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,462 Views)
Thanks.

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?

Thanks,
0 Kudos
Message 7 of 9
(3,462 Views)
So,

If [(A&B) is false ]&[C is true] then
{
Ain = Aout
Bin = Bout
{

See attached

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,462 Views)
I really appreicate your help. Here is the code again. Actually, the output of this Subvi will be the local variables to reset the valve status.

Thanks,
0 Kudos
Message 9 of 9
(3,462 Views)