02-13-2007 10:34 AM
02-13-2007 11:05 AM
Take a few steps back and rethink your code (focus on the part with all the booleans). 🙂
You need two horizontal arrays with 10 booleans. Initialize a 10 element boolean array outside the loop, then replace the desired element with TRUE depending on the slide 2 value..
Do you need individual access to ALL these wire segments or do they always turn on in groups? If so, all that jumble in the center should be replaced by a picture ring indicator, again hooked up to slide 2, where each element is a picture of one of the various states.
02-14-2007 09:39 AM
I was following the explanation that help me to understand what was better to solve the question. Now I have this issue where I don't know how to reset the previous value, I mean, I don't know how to reinitialize the cluster before change to a new value.
Attached the vi.
02-14-2007 10:46 AM - edited 02-14-2007 10:46 AM
What's with all these local variables??? You have 20 locals where you actually only need... drumroll... zero!
Do something like in the attached image, for example:

Since there is no shift register, each case starts out with the virgin cluster from the input tunnel and makes the desired modification. 🙂
Message Edited by altenbach on 02-14-2007 08:48 AM
02-20-2007 04:46 AM
Sirs, this is what I call optimization!!
Even if I really don't understand very well, right now, how it works; this was the kind of optimization I was looking for.
Thanks, really very precise.
This is not the end.
02-21-2007 10:21 AM - edited 02-21-2007 10:21 AM
@José Luis wrote:
Sirs, this is what I call optimization!!
Actually, you can make it even much simpler if this is all there is!
There is no need to go to the cluster and back on the left side and all cases are the same so we can eliminate the case structure entirely. 🙂
Message Edited by altenbach on 02-21-2007 08:22 AM