08-10-2009 06:21 PM
Hi! I have read the "Distributing Applications with the LabVIEW Application Builder" tutorial and followed the instructions on how to develop a stand-alone application. I have added my VI to a project and built an application specification (EXE). My problem is that after I have run the exe-file, I would like the program to close, but instead a window, much like my exe-file appears, but with a toolbar and a run- and abort button. How can I change the settings so that this window doesn't appear?
/Nina
Solved! Go to Solution.
08-10-2009 06:29 PM
Add after the end of code the quit labview vi. This should be in a case structure and only run when app.kind (property node) is an executable.
08-11-2009 02:27 AM - edited 08-11-2009 02:27 AM
What Paul suggested is right, use the "Quit LabVIEW" vi but even in development mode LV will be closed all the time you stop your vi in development and that can be really annoying.
So I do it this way
08-11-2009 02:40 AM
sunds wrote:Hi! I have read the "Distributing Applications with the LabVIEW Application Builder" tutorial and followed the instructions on how to develop a stand-alone application. I have added my VI to a project and built an application specification (EXE). My problem is that after I have run the exe-file, I would like the program to close, but instead a window, much like my exe-file appears, but with a toolbar and a run- and abort button. How can I change the settings so that this window doesn't appear?
/Nina
Or simply execute a Frontpanel:Close method node at the end of your application as last operation.
Rolf Kalbermatter
08-11-2009 07:50 AM
08-11-2009 08:44 AM
You can use property node to close the front panel. instead of Quit labVIEW. if your second executable is also labVIEW based, then Quit LabVIEW may close both....If you use Property node to close the front panel, this will close the front panel of the present executable as soon as it stops execution.
check the image for details..
To get this property node, do following.....
.place a property node (general), select right click on that. go to select class-->VI server-->VI-->VI
Then left click on the property, FrontPanel window-->Open
then right click on the node and select " change all to write".
08-11-2009 08:56 AM
falkpl wrote:
I always thought this should be a build option, Close exe when last vi finishes. Once you have a vi that does this you can use it in any application.
Actually it is not an option but even more forcing than that. As soon as the last FP has been closed the EXE will be removed from memory, eventhough there may still be a VI that has code to execute. Therefore it is important to execute the FP:Close method as last operation in the main VI, after you have closed all files, references and whatever.
Rolf Kalbermatter
08-11-2009 08:57 AM
Anil Reddy wrote:
You can use property node to close the front panel. instead of Quit labVIEW. if your second executable is also labVIEW based, then Quit LabVIEW may close both....If you use Property node to close the front panel, this will close the front panel of the present executable as soon as it stops execution.
check the image for details..
To get this property node, do following.....
.place a property node (general), select right click on that. go to select class-->VI server-->VI-->VI
Then left click on the property, FrontPanel window-->Open
then right click on the node and select " change all to write".
No Quit LabVIEW in one executable should not have any influence on another LabVIEW executable. A LabVIEW executable is a single process and what you do in there will not influence other processes, unless you do something specific like interapplication commmunication.
Rolf Kalbermatter
08-11-2009 09:07 AM
yeah, true...i tried the one with interapplication communication....
but this "quit labview" is not good option to close windows unless you are closing the main window that closes the entire application. if we want to close intermediate windows, it is always better to use property node i believe.
08-11-2009 09:22 AM
Yes I was suggesting the quit labview to ONLY BE used afte all code has executed in exe ONLY. This is only to be used on the top level VI. I have never used the quit Labview in any other place. If you close the top level window this also quits labview in the exe? I have never tried this, I mostly use state machines (queued state machines and place the quit labview to execute acter the rop level state machine is done in an executable and have not found any problems with it. I dont like to distribute applications tha leave labview opened after completion since it is a confusing state for users who are not used to LabView.