LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Cluster To single value

Solved!
Go to solution

In my program I'm using the In range and Coerce function to determine if 4 values fall within the range of -1 to 1. I have an input cluster and the in range boolean outputs 4 T/F results for each value. I also have a case structure built that will divide all values by 2 if any are outside this range. The case structure works but I need a way to wire the In Range result to the case structure. Is there any way to make it so if any of the 4 values fall outside the range and I receive a FALSE result to output a single False case to the case structure.

 

I just cant figure out how to convert the multiple boolean results into a single False if any of them are false. I'm fairly new to labview and learning as i go so forgive the likely sloppy VI.

 

0 Kudos
Message 1 of 6
(3,547 Views)

Look at the compound arithmetic block, set to use "AND", then wire the cluster components into it.

false-if-one-false.png

Message 2 of 6
(3,540 Views)
Solution
Accepted by danfol1890

I would use arrays because the math can then be done in one step also.

 

Lynn

 

array.png

Message 3 of 6
(3,535 Views)

@johnsold wrote:

I would use arrays because the math can then be done in one step also.

 

Lynn

 


Nifty.

Message 4 of 6
(3,530 Views)

Excellent! Thank you both for the quick responses.

0 Kudos
Message 5 of 6
(3,527 Views)

One important lesson here is that many times multiple solutions may be available.

 

In a situation like this one both arrays and clusters have their advantages. Many math operations are polymorphic, meaning that they will work without modification on several datatypes including arrays.  Sometimes they may work on clusters of numerics as your In Range & Coerce.  Clusters often have advantages over arrays on front panels and where the self-documenting feature is helpful.

 

Lynn

Message 6 of 6
(3,519 Views)