LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SURE FIRE WAY of KILLING (STOPPING) a LabVIEW-based EXE APPLICATION

Solved!
Go to solution

Hello:

 

I am running in circles trying to EXIT from a LabVIEW APP. I have monitored all loops to be sure that they STOP running by putting dialog boxes at EXIT stage of loop to confirm, AND the App minimizes to the TASK BAR. But WINDOWS says that it is STILL F****ing running?

 

What is THE VI that will ensure that ALL Processes are KILLED so that Application disappears completely from the TASK bar?

 

This is NOT Rocket science but I have yet to figure out a secret sauce.

 

Please help!

 

Anthony L.

0 Kudos
Message 1 of 19
(2,181 Views)

Maybe the VI isn't running but you haven't closed LabVIEW. When the program should stop, do you see the LabVIEW toolbar (with the white run arrow)? 

 

In that case you need to call the "Quit LabVIEW" VI. 

Basjong53_0-1707130433058.png

 

I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly

Quite LabVIEW.png

0 Kudos
Message 2 of 19
(2,174 Views)

@Basjong53 wrote:

Maybe the VI isn't running but you haven't closed LabVIEW. When the program should stop, do you see the LabVIEW toolbar (with the white run arrow)? 

 

In that case you need to call the "Quit LabVIEW" VI. 

Basjong53_0-1707130433058.png

 

I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly

Quite LabVIEW.png


I feel that (nowadays) this is a crutch.  If you have to use this, you're doing something wrong.  Pre-LV 7.0, you had to use it to properly exit an app.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 19
(2,130 Views)

@billko wrote:

@Basjong53 wrote:

Maybe the VI isn't running but you haven't closed LabVIEW. When the program should stop, do you see the LabVIEW toolbar (with the white run arrow)? 

 

In that case you need to call the "Quit LabVIEW" VI. 

Basjong53_0-1707130433058.png

 


I feel that (nowadays) this is a crutch.  If you have to use this, you're doing something wrong.  Pre-LV 7.0, you had to use it to properly exit an app.


Really? It has never given me any problems. What is the modern way to do it? Use the FP.Close invoke node on the main window?

0 Kudos
Message 4 of 19
(2,121 Views)

A built executable will stop execution as soon as all its windows (front panels) are closed. But remember that a hidden front panel is NOT closed.

 

However if you close the last front panel, the LabVIEW process terminates immediately, without waiting to pass through Go. 😁 At least that was the case until a few versions ago. Maybe someone added some extra respite period to it if there was still a VI running somewhere.

 

Your loop trying to do some important and absolutely needed cleanup at the end may simply get yanked out of existence midway. So make sure to only close your last front panel after you are really done with any important things.

Rolf Kalbermatter
My Blog
Message 5 of 19
(2,082 Views)

@rolfk wrote:

A built executable will stop execution as soon as all its windows (front panels) are closed. But remember that a hidden front panel is NOT closed.

 

However if you close the last front panel, the LabVIEW process terminates immediately, without waiting to pass through Go. 😁 At least that was the case until a few versions ago. Maybe someone added some extra respite period to it if there was still a VI running somewhere.

 

Your loop trying to do some important and absolutely needed cleanup at the end may simply get yanked out of existence midway. So make sure to only close your last front panel after you are really done with any important things.


I always merge the error wires coming out of all the parallel loops and use the output of the merge to enforce dataflow.  I put things like destroying references and events - and closing the top level front panel - after the merge to make sure everything is "done" before I go and destroy stuff, with the very last thing being closing the FP if it's an executable.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 19
(2,065 Views)

@Basjong53 wrote:

Maybe the VI isn't running but you haven't closed LabVIEW. When the program should stop, do you see the LabVIEW toolbar (with the white run arrow)? 

 

In that case you need to call the "Quit LabVIEW" VI. 

Basjong53_0-1707130433058.png

 

I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly

Quite LabVIEW.png


It works just like the STOP vi (or the abort button) so it comes with the same caveats.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 7 of 19
(2,057 Views)

I think that there should be a way of THROWING some sort of GRENADE to make the F**ing LV app STOP RUNNING!!!

I am really concerned that this thing is so hard to do!

 

How about a LabVIEW VI that "Kills itself" when in Exe MODE!

 

It should go:

 

KAPUT,

NADA,

ZILSH,

NULL,

GONE!!!

 

0 Kudos
Message 8 of 19
(2,022 Views)

This did not work for me.

 

Not sure why.

 

Anthony

0 Kudos
Message 9 of 19
(2,021 Views)

There are some suggestions here but the real answer is to figure out what is preventing your program from exiting.

 

Post your code.

 

 

========================
=== Engineer Ambiguously ===
========================
Message 10 of 19
(2,006 Views)