Tuesday, December 11, 2007

"Application Instance Close" Events

One of my friends recently asked me how to create a VI that runs in the background and shuts itself down when LabVIEW exits (without prompting the user to abort running VIs).

After a little research, we determined that the answer was using the "Application Instance Close" events.

This is a somewhat advanced topic, but using both the filter and notify Application Instance Close events achieves the desired effect.

If you want to see this in action, watch this video.

[Edit January 15, 2008] I need to underscore that this technique is needed when a VI is running as part of the LabVIEW editor. For normal applications, you do not want to suppress the "abort running VIs?" prompt because you want users to shut down a VI from its user interface.