07-12-2006 10:44 AM
07-12-2006 10:49 AM
yes you can use the "compound arithmetic" function in the numeric palette and set it to and or or. It is resizable
Cheers
07-12-2006 10:51 AM
07-12-2006 10:58 AM
Thanks to you both for the tip.
Yes this should just do the job....
TonyC
07-12-2006 10:59 AM
07-12-2006 11:35 AM
@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.
07-12-2006 12:07 PM
Correct, that is why it is in the arithmetic palette and not in the boolean one.
Cheers
07-12-2006 12:32 PM
07-12-2006 12:38 PM - edited 07-12-2006 12:38 PM
Message Edited by agill on 07-12-2006 10:39 AM
07-12-2006 12:51 PM
old habits... sometimes close your eyes!
Thanks. Cheers