12-30-2008 04:03 PM
Hello! I'm having some trouble stopping my VI with my stop button on the front panel. I thought that I had wired my "whole VI" stop button to every possible while loop, but when I press the button the VI continues as if nothing had changed. I realize the VI is kinda big, but if anyone has a free moment and could look it over, I would REALLY appreciate it. It's attached. I just need to know why my "Quit Program" button (on the far left of the VI) isn't stopping the program. Thanks ahead of time for the help.
Matt
Solved! Go to Solution.
12-30-2008 04:08 PM
Your stop button terminal is outside the loops, and thus will only get read once at the beginning of the program. The terminal needs to be in the innermost loop so it gets read with each iteration. (use a local varaible if needed).
12-30-2008 04:13 PM
12-30-2008 04:28 PM
Looking at your VI, you should really refactor it from scratch as a simple state machine with a max of 2 parallel loops that fit on a single screen
You have while loops stacked knee-deep everywhere!
You clearly have some serious misconceptions about the nature of dataflow. Run your VI in execution highlithing mode to see what's (not) happening on the diagram when you press quit.
12-30-2008 04:49 PM
I know, I know.... It's really really messy. I have no excuses; I'm lousy at this. It's not my job and I'm not a programmer by any definintion. I'm actually a psychology graduate student, trying really hard to make my hardware work with minimal effort, and no money. Thanks for the help. The global variable worked like a charm.
Matt
06-24-2015 02:48 AM
my stop button is not working..when i press my stop button it doesn't stop my program.... ihave not used multiple of while loops... i have one while loop, event structure and some case structure in my program...so can u plz tell me the solution of dis?? rply asap
06-24-2015 03:18 AM - edited 06-24-2015 03:20 AM
Hi thakurshubh,
you already have been told to create your own thread, but you keep highjacking old, outdated and unrelated threads…
CREATE YOUR OWN THREAD!
(And attach your VI instead of just describing your problems.)