Western PA LabVIEW Users

cancel
Showing results for 
Search instead for 
Did you mean: 

Quit LabVIEW Only from Built Application (.EXE)

Recently Mark Ridgley posted an example program of how to quit LabVIEW if and only if no other VIs were active in memory (see document here: http://decibel.ni.com/content/docs/DOC-4086). I like his approach, but my needs were slightly different.

I only wanted to quit LabVIEW if the VI was running inside an executable (that is to say - never quit the development environment).

The result uses a case structure and a VI Server Property Node to determine if the current execution system is a built application or the development environment.

Mark's approach has an elegance that my solution makes up for with brute force. Meaning if you are using dynamically loaded VIs, or if any other VI is running in the .EXE at the time this VI is called, they will be shut down.

Perhaps someone wants to create a hybrid which will quit only from a built EXE IFF no other VIs are in memory.

Message 1 of 2
(11,947 Views)

You can use a Conditional Diagram Disable Structure with the variable Run Time Engine instead of using the property node.  It is a little more efficient and a lot cleaner for the compiler.  Further, I also suggest closing the front panel instead of using the Quit LabVIEW.  This is much better cleanup process for the LabVIEW RTE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(5,522 Views)