02-05-2024 04:41 AM
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.
Solved! Go to Solution.
02-05-2024 04:55 AM - edited 02-05-2024 04:56 AM
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.
I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly
02-05-2024 06:57 AM - edited 02-05-2024 06:58 AM
@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.
I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly
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.
02-05-2024 07:08 AM - edited 02-05-2024 07:09 AM
@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.
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?
02-05-2024 09:30 AM
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.
02-05-2024 10:55 AM
@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.
02-05-2024 11:05 AM
@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.
I use this simple VI at the end of each of my applications to be sure that the window (and therefore process) close properly
It works just like the STOP vi (or the abort button) so it comes with the same caveats.
02-05-2024 02:33 PM
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!!!
02-05-2024 02:36 PM
This did not work for me.
Not sure why.
Anthony
02-05-2024 03:41 PM
There are some suggestions here but the real answer is to figure out what is preventing your program from exiting.
Post your code.