LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply multiple if statements to one input

Solved!
Go to solution

We are trying to apply multiple if statements to a value of frequency, and want to display a particular string to the front panel depending on whether the frequency is in one of our 12 predetermined ranges of frequencies. Is there a way to do this without creating 12 different case structures?

0 Kudos
Message 1 of 2
(2,396 Views)
Solution
Accepted by topic author aleto

My recommendation is to make an array of your range limits.  You can then use Threshold 1D Array to get an index value.  Round the index value toward -Infinity.  If you just want to show a different string, then make a corresponding array of strings and use Index Array with the found index value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,394 Views)