ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
06-24-2008 10:02 AM
06-24-2008 10:16 AM
alek wrote:
I still can not entirely understand why was it not stopping - why does it stop now and not before?
Correct is to add an event for the stop value and all is well. 😄
An illustrative debugging tool is to run the VI in execution highlighting mode while watching the diagram. Try it!
(Of course you could define a finite timeout and leave things as is in the original code, but why would you spin an empty loop for no reason at all except to poll the stop button? Makes little sense in the grand scheme of things. Even worse, if you would define a timeout of zero, the loop would spin at max rate, consuming all CPU it can get while not really doing anything useful) 🙂
Good luck and happy wiring!