You seem to have a conceptual problem with dataflow. Don't worry, after playing with LabVIEW for a while, things will become very easy and clear very soon. 🙂
Others have pointed out already the core problem. Don't forget that you can set your VI to "execution highlighing" mode: Press the diagram toolbar button with the lightbulb to on and now ruin the VI while watching the diagram. Now you see how the data flows in slow motion and you can see where things go wrong.
You seem to be familiar with text based programs and are trying to duplicate the functionality of "variables" using local variables. This is normally not needed. A local variable is just a secondary access to a front panel element, so if you do the following...
...you are writing the same wire value to the indicator directly and then again to a local variable representation of the same indicator. Basically, you do the same thing twice. You can delete that local variable and it will not change one thing! 🙂
In addition, the indicator should probably be an integer (blue) an not floating point (orange), so change the representation by right-clicking. There is no tab =1.5, for example. 😄
You seem to be creating that indicator for the sole purpose of checking its value against a constant. So, instead of relaying through a local variable, place the tab terminal where it is needed. Now right-click the tab terminal and "create constant. Select the right tab and compare that, directly where it is used.
Two of your loops will spin only once, so you might as well delete these loops. The termination terminal is "continue if true", but you use latch action booleans. These are typically OFF, you your loop will spin only once. These same loops also don't have a small wait statement (e.g. 100ms). If they would ever spin, they will consume all CPU, recalcualting the same old data over and over again.
Again about locals. Controls and indicators have their own data copies and will retain them forever unless new values are received. The following makes thus no sense. You are reading the data of an indicator via a local variable, then immediately write the same data back to where it came from. Pretty useless. 😉
Overall, the code is still too chopped up to make any sense. Let us know if you have a more final version so we can help eliminate some typical beginners mistakes. 🙂 Good luck!
Message Edited by altenbach on 09-06-2007 08:48 AM