LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building a case structure with four boolean (true/false) inputs.

Solved!
Go to solution

I currently have two boolean inputs that I would like to use to select cases in a case structure. I would like to have four cases, each one dependent on the true/false condtions of the two booleans. If boolean 1 =true, then case 1 should be used, if boolean 2=true, then case 2 should be used, etc.

 

What structure should I use to convert these boolean inputs into numeric cases?

0 Kudos
Message 1 of 5
(5,084 Views)

Build your two booleans into an array. Then use boolean array to number.

PaulG.
Retired
0 Kudos
Message 2 of 5
(5,074 Views)
Solution
Accepted by topic author KFod
Build Array for the two Booleans and then a Boolean Array to Number.
0 Kudos
Message 3 of 5
(5,072 Views)
Solution
Accepted by topic author KFod

Or build them in to an array and "Search 1d Array".  If you are only looking for a single bool being true, this would be easier because your cases could be {0,1,2,3} instead of {1,2,4,8}

Message 4 of 5
(5,066 Views)

Change the radix on the case selector to boolean if it makes more sense to view the cases as 1's and 0's rather than base10 numbers.

aputman
0 Kudos
Message 5 of 5
(5,012 Views)