From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-19-2010 03:45 PM
Sorry for the newbie question but I can't seem to find the answer anywhere. How do I go about taking action such as turning off leds or reseting some variables when my vi stops running. Is there some sort of boolean flag that I can read to determine if the vi is running or a flag that gets set when the vi terminates? Thanks in advance.
Solved! Go to Solution.
10-19-2010 03:48 PM
Shouldn't your VI know when it has stopped running? If you have a loop around your VI then you know when it has stopped running - it's when the loop stops.
Or, are you using the Abort button on the VI? If you are, STOP right now. The Abort button is not supposed to be used for normal operation.
10-19-2010 04:10 PM
Thank you for your reply. I am using the abort button, this is just a simple vi that alternately flashes a couple leds and runs until someone stops it. I need all the leds to go off when the vi is stoped. I understand your point though, I suppose if I add a stop button to terminate the vi I can use that to turn off the leds also. Thanks again!
10-19-2010 06:28 PM - edited 10-19-2010 06:28 PM
The state of the LEDs should not be important if the VI is not running (edit mode), it is however probably important that they are off next time you run the VI.
To make sure that indicators start out at the desired defaults when the VI starts running, go to "VI properties...Execution" and enable "clear indicators when called".
10-19-2010 08:34 PM
That is very helpful, thank you again.
07-28-2011 09:49 AM
Funny thing, I was wondering how to solve same problem.
07-28-2011 05:11 PM
If your inicator states are something other than the default, you can use property nodes to set them as well during your initialization phase.