LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case selection by array value

Hi,

 

I am trying to select different case using integer value in array,

however it is selecting the case by the value I got using index array block.

Basically it stay the first encounter case, and stay there even if the case value from array changed.

 

Does anybody know why the labview is behaving this way?

 

Thank you.

 

do

 

 

CaseWArray.JPG

0 Kudos
Message 1 of 3
(2,458 Views)

Without seeing the values in the array nor the other cases, and neglecting the fact that nothing is setting the number of iterations of the for loop, I will make a couple of guesses.  First, that you only have the cases 0,Default and 1 in the structure.  Any value not equal to one will lead to the selection of the 0,Default case (that is why it is called default).

 

I suggest turning on context help (Ctrl-H) and selecting the case structure. 

 

I would also suggest posting the actual code you tested since the screenshot you showed obviously won't run. 

0 Kudos
Message 2 of 3
(2,453 Views)

I did this example hope it helps, right now the code you posted wouldn't do anything even if you did wire the N value.

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 3 of 3
(2,448 Views)