I am not able to stop the program or click any other buttons while the for loop is running. How do I fix this?
In LabWindows/CVI, once a callback is entered, user interface buttons are ignored until you return from the callback, unless you call ProcessSystemEvents().
Another way to achieve this could be to drop a timer control on your UIR and set its interval to be 1 second. This timer control will call a routine in your code at the interval you define. Then, you just enable or disable the timer from the callbacks for the run button and stop button.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.