Showing results for 
Search instead for 
Did you mean: 

Close vi reference not working on reentrant vi

Go to solution


Changing that False to True solves one problem but creates another. It brings up the user prompt asking if I want to quit the program. I want the code to end automatically and not prompt the user to quit. I suppose I can create another event case with a dummy "All Stop" button to force the behavior I want, but I would like something simpler.

0 Kudos
Message 11 of 13
Accepted by topic author jdezman



I've taken another look at your code and I think I see why the program isn't able to successfully exit after it finishes execution.  The only way that the top loop stops if when VI STOP becomes true but, because you are using value signalling but leaving the VI STOP boolean false, I don't think the top loop will ever stop.  The easiest way to fix this might be with another boolean that changes with the value fed into the stop condition of your bottom loop and use that new boolean to stop your top loop.



Trey C.

Message 12 of 13



That was the problem. To fix it, I actually created a new, hidden boolean in the upper loop called Auto-Stop. Then I fed that and the VI STOP local into an Or function, then into the stop for the upper loop. A local for Auto-Stop with a True wired to it sits in the Save event to trigger the button. It now behaves as desired.


Thanks for your help. I don't think I would've spotted that. I realize that it is tough for you when you don't have my setup or all the code available to you.

0 Kudos
Message 13 of 13