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
(2,370 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
(2,356 Views)

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

 

Thanks a lot! 🙂

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

Maybe something like this:

 

N.JPG

0 Kudos
Message 4 of 4
(2,350 Views)