キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/10
5,038件の閲覧回数

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
メッセージ2/10
5,030件の閲覧回数
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.
メッセージ3/10
5,024件の閲覧回数

Thanks to you both for the tip.

Yes this should just do the job....

TonyC

 

0 件の賞賛
メッセージ4/10
5,016件の閲覧回数
If you want some complex logic that you will use multiple times, you can also make you own subVIs.

Lynn
0 件の賞賛
メッセージ5/10
5,011件の閲覧回数


@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 件の賞賛
メッセージ6/10
5,000件の閲覧回数

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 件の賞賛
メッセージ7/10
4,991件の閲覧回数
The compound function is in both Numeric and Boolean palettes since at least LV 6.

Lynn
0 件の賞賛
メッセージ8/10
4,985件の閲覧回数
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 件の賞賛
メッセージ9/10
4,978件の閲覧回数

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 件の賞賛
メッセージ10/10
4,971件の閲覧回数