LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2013 SP1 Quit LabVIEW

Hello all, first I want to excuse my really late answer. But in the last days, we were really busy (as usual). Yesterday I got the time to run a repair over my labview installation. Since then, the function 'Quit LabVIEW' is working. The next step will be, to find out why I need the 'Quit LabVIEW'. I had also some time yesterday, to play around with 'Open' and 'Close' VIs. And after closing all open FPs the application I built from my test project was just quitting and closing. So I should not need the 'Quit LabVIEW'. Regards Heinrich Eidloth
0 Kudos
Message 51 of 53
(546 Views)

Do I understand how the Application instance close? filter event with discard true works? Does it trap the red X close and not do anything beyond letting me know that the red X has been clicked so that the cleanup can be run before shutting down?

 

It seems to be working differently on this system (labview 2013 running on Ni PXIe8135 controller and windows 7). There are no dynamic vi's. There is a dialog in in the Application instance close? event and one in my cleanup routine to show what was going on. When I click the Red X, the front panel vanishes but the process is still running. No dialogs are displayed. When I kill the program with task manager the dialogs are displayed.  Do you know what is happening here?

 

Thanks, Jeff, for the post. It was very helpful.

 

I did find an alternate solution. Instead of using Application instance close? use <This vi> panel close?  This allows the cleanup to run and the program is no longer running.

0 Kudos
Message 52 of 53
(517 Views)

Yes! Clicking on the red X in the upper right corner does not trigger an application close event but simply a front panel close event, first the filter event and then the final event. Once the front panel is gone and no other references are open to the VI, the VI is unloaded and when this was the last front panel loaded, the LabVIEW application exits. So you have really two event cases of quiting a LabVIEW app:

 

1) panel close event (?) on the last (usually main) VI panel

2) application close event when the system tells LabVIEW to please quit

 

I usually solve this by having a state machine wrapped around the event structure. Any of the quit events such as a menu selection, front panel close, application close and explicit quit buttons eventually goes through the exit state in which everything is completely cleaned up, then the state machine is exited and the panel is explicitedly closed through VI server again just to be sure (for the menu, app close event and exit buttons). This is the last action that the main VI does and after that the LabVIEW runtime engine quits automatically for sure.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 53 of 53
(511 Views)