ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure based on a parameter

Solved!
Go to solution

Hi everybody!

 

So I was wondering if we could create a case in a case structure, that's based on a parameter.

 

So here is what I mean:

I have a case structure inside a for loop (i=0,..,N-1). I would like for the case structure to have 3 cases: default, i=0 and i=N-1.

The problem is that N can change from time to time. It is not a fixed value.

 

Therefore, is it possible to create a case that's litterally "N-1" ?

 

 

Thanks in advance!! 🙂

 

Valentine

0 Kudos
Message 1 of 4
(3,203 Views)
Solution
Accepted by topic author VGans

No.

 

But why couldn't you put the N into the equation that determines which case to run.  You do the calcualtions and comparisons in the code leading up to the selector terminal.

0 Kudos
Message 2 of 4
(3,189 Views)

Thanks I didn't even think about that. So stupid! 😄

 

Thanks a lot! 🙂

0 Kudos
Message 3 of 4
(3,186 Views)

Maybe something like this:

 

N.JPG

0 Kudos
Message 4 of 4
(3,183 Views)