LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure with value interval

Solved!
Go to solution

Hello NI crew! I have to program a case structure to switch between many cases. But, the problem is that the cases are not activated with concrete values, but with intervals, for example:

 

being "A" the variable that can have several values (decimals included):

 

1<= "A" <= 2       ->        case 1

2< "A" <= 3         ->        case 2

3<"A" <= 4          ->        case 3

 

So, is there a simple way to do this with a case structure?

 

Thx in advance!

 

0 Kudos
Message 1 of 2
(3,910 Views)
Solution
Accepted by topic author Rokinger

Hello 🙂

 

If you are using a numeric value to trigger the case struvture all you need to do is type 3..15 into the case selector label (note the two period chars) and this will call this case for any value in the range 3 to 15.

visnip1.png

 

Happy coding!

 

Dave.

Senior Software Engineer
www.Adansor.com
Message 2 of 2
(3,904 Views)