04-07-2013 06:56 PM
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.
Solved! Go to Solution.
04-07-2013 07:06 PM
Look at the compound arithmetic block, set to use "AND", then wire the cluster components into it.
04-07-2013 07:15 PM
I would use arrays because the math can then be done in one step also.
Lynn
04-07-2013 07:19 PM
@johnsold wrote:
I would use arrays because the math can then be done in one step also.
Lynn
Nifty.
04-07-2013 07:21 PM
Excellent! Thank you both for the quick responses.
04-07-2013 07:31 PM
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