LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to close a front panel after it stops

I am ruuning an executable and in the end will start executing another executable.  How can I close the first opened front panel?(already stopped running)
0 Kudos
Message 1 of 5
(6,474 Views)

Hi hellolv,

 

The "Quit LabVIEW" function will close your LabVIEW executable window.  If you use this function as the last function call in your application, your window will close as soon as the application finishes.

 

 This can be done as simply as this example:

 

but I find this can be frustrating when developing/debugging and application, so you can use a simple check of the application kind to see if this is running in the development environment or in the run-time system as an executable, and only "Quit LabVIEW" when the application is compiled and running as an exe, like this:

 

BTW, if you wanted to architect your application such that the launched executable closes the launching executable, that will be more involved.  You will need a way to pass a reference to the window to the launched executable so it knows which exe it should close.  This could be done using VI Server, or with calls to the Windows API.

 

Cheers,

 

Message Edited by Spex on 04-14-2009 04:41 PM
Message Edited by Spex on 04-14-2009 04:43 PM
Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
Download All
Message 2 of 5
(6,463 Views)

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..

 

Regards

Anil

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
Message 3 of 5
(6,446 Views)

where can I find this Property node?

 

I am using Labview 8.6 and I cannot find this Property Node.

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 5
(6,395 Views)

Okieeee....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".

 

That will give you the property node i mentioned in my previous post.

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
Message 5 of 5
(6,393 Views)