LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Reread user inputs after detecting they're invalid

I was wondering if there was a way to redetect/reread user inputs once the original values were detected to be invalid? If I place everything in a continuous loop, i've tried manually pausing the vi. When I unpause the vi, it does reread the inputs. Any ideas would be appreciated. Thanks!
0 Kudos
Message 1 of 4
(3,033 Views)
If the terminals for the controls are inside your loop, they will get read on every loop iteration. You could also use local variables or control references for the controls, again, inside the loop.
Message 2 of 4
(3,033 Views)
Thank you! the problem was I had the inputs within a sequence within the loop. I moved the controls outside of the sequence but within the while loop, and it worked... I don't know why I didn't try that particular combination before. Thanks a bunch!
0 Kudos
Message 3 of 4
(3,033 Views)
If the terminals were within a sequence within the loop, they still would have been read on every loop iteration, but maybe after you needed the updated value. Unless you had them in a case and the case wasn't selected on the loop iteration. There could have been several ways in which your program was structured so you wouldn't see the updated values when you needed them, but there was more to it than just having the terminals in the sequence. Just be careful that you have good control over when the updated values are read (e.g. using dataflow control) in relation to everything else happening in your loop.
0 Kudos
Message 4 of 4
(3,033 Views)