In addition to what the kid just said:
There is no reason to set such a VI to time critical priority(!) As you have done here. This makes the VI extrememly greedy for system resources and everything else running on your computer gets starved and suffers. Long ago, I had a wireless network driver that would loose connection in such a case. (I am sure that you noticed that even the mouse actions don't get the system attention that you learned expect). Anything above normal priority should be reserved for small, low-level driver VIs that complete very quickly and only run occasionally. In general, don't change the default priority unless there is a very, very compelling reason to do so and it really makes a difference to the outcome (it virtually never does!).
Since you are just starting out, here are a few tips:
- Always use a small wait in any toplevel while loop of the UI.
- Don't use indicators as controls. An LED is not an obvious control to the typical user.
- Use latch action booleans, eliminating the reset via local variables.
- Use proper data types. Set your numeric indicators to I32 in agreement with the data.
- You probably can get away with a single while loop containing a case structure. Much better than stacked while loops.
- Make sure your controls are not "blocked". For example it is currently impossible to stop the VI with your stop button while the inner loop is running.
- Learn about the event structure. It makes many things much cleaner.
Happy wiring! 😄