LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logic gate inputs

Hi all
 
Does any one know if there is any logic functions that have more than two inputs?
Other than wiring extra inputs yourself by compounding gates!
Can't see any in the functions.
 
TonyC
 
 
 
0 Kudos
Message 1 of 10
(4,158 Views)

yes you can use the "compound arithmetic" function in the numeric palette and set it to and or or. It is resizable

 

Cheers

Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
Message 2 of 10
(4,150 Views)
Use the Compound Arithmetic function. You can right click and change modes to AND, OR, XOR. You can right click on any input or the output and select Invert.
Message 3 of 10
(4,144 Views)

Thanks to you both for the tip.

Yes this should just do the job....

TonyC

 

0 Kudos
Message 4 of 10
(4,136 Views)
If you want some complex logic that you will use multiple times, you can also make you own subVIs.

Lynn
0 Kudos
Message 5 of 10
(4,131 Views)


@johnsold wrote:
If you want some complex logic that you will use multiple times, you can also make you own subVIs.

Lynn


Another neat thing about boolean algebra is, if you replace every "and" with a multiply, and every "or" with an addtion, and do the appropiate things with negation, you can evaluate the expression using regular numerical algebra.

Example:

~AB + A~B + AB + ~A~B should be TRUE (you can verify this using the distributive property)

Now we apply normal math to it:

For A and B  both TRUE (TRUE = 1)

=~1*1 + 1*~1 + 1*1 + ~1*~1

=0*1 + 1*0 + 1*1 + 0*0

=1

You can verify this works with any combination of A or B.

Another example:

take the expression A+B+C+D, with A=B=C=D=TRUE

Evaluating the expression gives you 1+1+1+1 = 4, which is equivalent to TRUE

You may be thinking, hmm, 4 is not TRUE or FALSE, but remember, in a lot of programming languages, 0 is FALSE, and anything else is TRUE.

0 Kudos
Message 6 of 10
(4,120 Views)

Correct, that is why it is in the arithmetic palette and not in the boolean one.

 

Cheers

Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 7 of 10
(4,111 Views)
The compound function is in both Numeric and Boolean palettes since at least LV 6.

Lynn
0 Kudos
Message 8 of 10
(4,105 Views)
Same in v7.1
 
Knowing that boolean arithmetic follows numeric arithmetic makes filling out truth tables a breeze.

Message Edited by agill on 07-12-2006 10:39 AM

0 Kudos
Message 9 of 10
(4,098 Views)

old habits... sometimes close your eyes!

 

Thanks. Cheers

Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 10 of 10
(4,091 Views)