02-21-2019 10:29 AM
Hello,
I have a while loop which stops when an indicator in this loop becomes true. When this indicator is true it also acts as a trigger for a case structure. Problem is that I cannot find a way to initialize the value wired to the case selector. Am currently trying with a local variable but with no luck. While the indicator gets reset to its default value, the local variable retains the last value in the indicator which is True. And in my second attempt at the testing, the case structure does not wait for the trigger because it was never called until the while loop stops. Any way to reset the case selector to its default value, once the condition has been fulfilled?
Have attached concerned part of the code, hope it helps.
Any suggestions will be appreciated.
Greetings,
mulayvus
02-21-2019 10:40 AM
It would be better if you attached a picture that shows more of the code, or even the actual VI. There is barely enough there to see in what you attached!.
It looks like you have a while loop inside a case structure, and it runs parallel to the other while loop. With your heavy image cropping, I can't tell if that is the true or false case.
That case structure will only run once depending on the value of the local variable. It will never run again.
Your code seems inside out. And using local variables is hinting at problems with race conditions.
Local, Global, or Network Shared Variable Can Cause Race Conditions
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours