LabVIEW is a dataflow language and the wire is the most efficient way to transport data.
This discussion comes up once in a while.
here's a recent thread worth reading. Enjoy!
You can see for yourself: If you redo your exact code with a single shift register an NO local variables (see attached, LabVIEW 7.1), the code is 40% smaller (7.9k vs 13.7k)!
🙂 (Also notice that the stop button is now set to latch and will automatically reset once it is read by the diagram, no need ot reset it with a local variable.)
Obviously, you are coming from a text-based programming background. It would be important to rethink your approach before starting with large LabVIEW projects. Dataflow is extremely powerful and you should definitely embrace it. It will make LabVIEW programming much easier.
Local variables also make extra data copies, which is not a problem in your tiny case, but could be an issues if you are dealing with large data arrays.
Also, imagine you have 20 indicators that need to be updated. If by accident you would forget to update one of them in one of the cases, it would be difficult to find the problem with your programming technique. Im my example, you would immediately see that one output tunnel does not receive data in all cases because it would show as hollow.
Message Edited by altenbach on 05-29-2005 10:20 AM