03-01-2024 02:47 AM - edited 03-01-2024 02:48 AM
Just started to learn LABVIEW and face this kind of difficulties. The while loop is not working, but when the stop button is pressed the loop is happen only for a cycle. Looking for help/suggestion.
Solved! Go to Solution.
03-01-2024 03:16 AM
Move all indicators inside the loop. Think in dataflow. The data in the wires outside the loop only updates once the loop has finished.
03-01-2024 03:25 AM - edited 03-01-2024 03:26 AM
@MDewey wrote:
Just started to learn LABVIEW and face this kind of difficulties. The while loop is not working, but when the stop button is pressed the loop is happen only for a cycle. Looking for help/suggestion.
The while loop iterates once per second
You can even see the iteration once you start debugging using the highlight execution tool: you really should use this to help you understand your own code! 🙂
03-01-2024 07:54 AM
I'd say the code works as expected, not just as you wanted it to. 🙂
As a tips you can r-click the needle meters and activate Visible Items -> Digital display so you don't need to update 2 controls for each value.
LV will read the Stop button long before it starts the wait, so it'll loop around one extra time and have on average a 1.5 sec stop time.
03-03-2024 01:38 PM
Hi, thank you for your reply. Yes, since the numeric indicator did not showing any number, i thought the problem is on the loop. Thank you for letting me know.