09-25-2009 04:54 AM
I have a while loop containing a number of subVIs, that takes several seconds per iteration. The exact time taken varies based on the subVIs communicating with a number of devices via GPIB, RS232 and ethernet.
I have the conditional terminal of the loop wired to a stop button. So under normal operation, the user presses STOP, and this this is read at the the end of that iteration. There is then one more complete iteration before the loop terminates.
Is there a way of quitting the loop instantly. I.e. not having to wait for the conditional terminal to go TRUE?
Cheers,
Dan
09-25-2009 04:57 AM - edited 09-25-2009 04:58 AM
Edit: Make sure you closed all references of any VISA functions if used.
09-25-2009 07:36 AM
My advice is to read the Stop button in each one of those VI's. Have each VI contain a Stop In and Stop Out. When the VI receives the Stop, it can send out it's own Stop output to keep the subsequent VI's from running. If all the VI's are wrapped in a case statement so that they don't run if Stop is True, then that second iteration will still happen, but it won't matter. Make sense?
The Stop function is the same as hitting Abort. Risky.
09-25-2009 07:40 AM