LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If thing 1 is true return true. If thing 2 is true return false. (not quite like select function)

I have two inputs within my LV program.  I need to output true (or value for true) if input 1 is true but output false (or value for false) if input 2 is true.  The select function allows different outputs but for only 1 input. 
0 Kudos
Message 1 of 5
(2,977 Views)
What if they are both true? Or both false? You need a simple logic table like this:

a b result
0 0 ?
0 1 0
1 0 1
1 1 ?

Fill in the question marks, then the logic will be obvious if you speak it using the word "and" or "or".
0 Kudos
Message 2 of 5
(2,971 Views)
It should be fairly eeasy to come up with a boolean structure fo this.  For example, you have if input 1 as a true and input 2 as a true, what does it output???

Normally you can make a table to figure out what structure you could use.  1 = true, 0 = false

Input 1   Input 2   Output
0            0            0
0            1            0  
1            0            1
1            1             0 (I am assuming)

That means if you write it out out need (input 1) * (input 2)' or an And terminal with input 1 wired to a terminal and input 2 wired to a not and then to the other and terminal (see picture)
Kenny

0 Kudos
Message 3 of 5
(2,963 Views)

Here is another way to do it:

Message Edited by tbob on 03-22-2007 10:01 AM

- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 5
(2,947 Views)
Hi all,

it's even more simple to use compound arithmetic for this term (used constants for simplicity):

Message Edited by GerdW on 03-22-2007 06:05 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 5
(2,942 Views)