Hi Mike,
Thanks for your answer. Your right that my methode was inefficient.
I tried your methode to avoid zero's with the use of emty arrays. But i don't know how i can put them in an 1-D array. Maybe you can help me with my vi?
Tnx
Hi Mike,
Tnx for your help! ![]()
Joyce
I probably would do something like in the attached (4.vi or 5.vi, LabVIEW 8.2).
It's a bit more compact and more scaleable. I would even make the control an array of booleans (see 5.vi). Now the code stays the same even if you have 5, 20 or 50 booleans. 🙂 Add free labels for the elements if desired. Also reverse the array if you want it in descending order. Your call. 🙂
(All the other code mentioned does not scale well, and needs to be modified (and gets more complex!) whenever the number of booleans changes. Not good! :))

JoyceJacobs wrote:
They supose to remove the zero values from the array. In the 2.vi not all zero values are removed...but i think it has to do with the function of the shift-register and the order of the inputs into the index array. Am i right?