LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dr. Damien's Development - The Xylophone Project IV - Core Architecture

I disagree on viewing it as a race condition, this behaviour is predictable. I guess it has something to do with LabVIEW.exe waiting for all VIs to finish to do some clean-up on it's own. I can have the dialog open for any time. So I don't see any of the timing issues that normally show up when having a race condition.

When I build an executable, this clean-up dosen't need to be performed (or not the same way). So we immidiatly get the Exit befor the dialog is shown.

 

Anyhow, I agree on using the filter events and discarding it.

 

Felix 

0 Kudos
Message 21 of 22
(988 Views)

Felix,

 

you are correct that the behaviour is not explained by a race condition.

Please read this KB for some information about "Application Exit". In general, i suggest to use "Panel Close?" (1) in the main VI of your application instead of Application Instance Closed (2).

The reason:

(1) is triggered if the user interface is closed. If your application is controlled by a human user, this is the way the application will be potentially closed  (pressing the x of the Windows Title Bar) instead of using the Quit-button within the UI. For top-level VIs, closing the front panel is equal to quit execution. Not discarding this event will abort the VI after the event handling. (see attached PanelClose.vi if not discarding the event). Nnote: Most often, closing the toplevel VI in your .exe leads to a shutdown of the LV RTE.

(2) is triggered when the RTE controlling your Application Instance is shut down. This is an external process normally not created within the application itself (see linked KB). In the ADE, the event could be generated by unloading the project.

 

In both cases, not discarding the event will prevent the LV RTE to execute code after the event case. (1) will abort the VI after the execution of the event case and afterwords shut down the RTE. (2) will shut down the RTE and use the event to notify running code about this.By filtering, you can choose not to let that happen (the shut down).

 

Refer to this help for information about (2).

 

hope this helps,

Norbert 

 

[Edit] The attached code is generated in LV 8.6 

Message Edited by Norbert B on 03-18-2009 08:18 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Download All
0 Kudos
Message 22 of 22
(979 Views)