> Pretty much yes, but I want to use the same array (control or
> constant) as both an indicator and a control. This way I can replace
> the array contents (which would be in a loop) and don't worry about my
> initial array and my final array being two different arrays. Can I use
> the local variable only for this?
As the earlier post stated, try using the local variable to update a
control from the diagram. You probably shouldn't place it inside the
loop, but use a shift register. Thus, take the value from the terminal,
into the left shift register. Inside the loop, take the left shift
register value, modify, and write to the right shift register. Outside
the loop again, wire from the right shift register to the local.
If you do no
t want to allow for user modification of the array control
during this, you can disable and reenable the array using a property node.
If you are not really doing this for UI, but to try and reuse memory,
then this is really the wrong approach. LV wires are really the most
efficient way of dealing with data, and you don't need to worry about
putting things back into an array unless it is for the UI. If it is to
pass out of a subVI, you will put them into a new array indicator in
fact, and when called as a subVI, this can often take no additional
memory, using the caller's array input throughout the diagram. If you
start using the local, this is no longer true, and you now have both
memory and runtime overhead. So use locals, and property nodes, only
for UI tasks, and your VIs will be much more efficient. For everything
else, use wires and shift registers.
Greg McKaskle