LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2013 SP1 Quit LabVIEW

Hello Hooovahh,

 

thanks for the workaround. It is working.

 

QuitLabVIEW.png

 

The upper part shows the working Sourcecode. The lower part was a short test I tried, just to see what's happening. And the exe won't quit. Seems, that the exe hangs in the 'Quit LabVIEW'

function.

 

Regards

Heinrich Eidloth

0 Kudos
Message 31 of 53
(1,290 Views)

Heinrich,

 

how does the application work when closing all windows of the application rather than killing the LV RTE using "Quit LabVIEW"?

 

I am referring to the method "Front Panel Close" of the VI class.

If you call this in the shutdown situation for all displayed VIs, the application should shutdown gracefully once the last window is closed.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 32 of 53
(1,283 Views)

Hello Norbert_B

 

that's it, what I'm doing, before 'Quit LabVIEW'.

 

Regards

Heinrich Eidloth

0 Kudos
Message 33 of 53
(1,278 Views)

If all windows are closed, does the process continue to exist if you do not call "Quit LabVIEW"? This is possible, but not the common case....

If so, do you call VIs dynamically in your application?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 34 of 53
(1,276 Views)

@Norbert_B wrote:

If all windows are closed, does the process continue to exist if you do not call "Quit LabVIEW"? This is possible, but not the common case....

If so, do you call VIs dynamically in your application?

 

Norbert


My appologies for the hijack.  You, my good OP, assume "Windows" are either "Open" or "Closed" Norbert knows better!

 

Norbert.................  "Windows" may be in numerous "states"  FP.State=="Hidden" is one.  The application instance of the context in which a "Hidden" FP is open (but hidden) can leak memory like a (UTF) SIEVE!Smiley Surprised   Keeping LabVIEW objects in memory without them appearing in certain "Windows" is a feature that is often exploited by application developers. 

 

FOR EXample At times. this can help with keeping info on an action engine's USR's in memeory (Just hide its FP) when called from Teststand. 

 

File>>Close All from any LabVIEW panel is the known workaround.  The UTF dev team should explore the "Loads FP into memory" Characteristic--- It can have unintended consequenses!


"Should be" isn't "Is" -Jay
0 Kudos
Message 35 of 53
(1,249 Views)

Hello all,

sorry for my late answer, but we are 'a little busy' at the moment.

To Norbert_B:
Yes, I'm using dynamically called VIs; and yes, the process
sitll exists (therefore no quitting).


When I shutdown the SW, I check the property 'FP.State' for every VI with an FP
(VIs which FP can be shown to the user). In case of 'invalid' or 'closed'
nothing will be done, otherwise the method 'FP.Close' is called.

After this check I close the VI reference with 'Close VI Reference'.

I will try a repair or reinstall LV2013SP1 in the next days. Ms. Kurz suggested this
previously in this thread.
A colleauge told me yesterday he had troubles with LV2012 on a new installed PC
(the PC was setup using an image of another PC, like mine).
He was missing some property nodes an could not build an executable (beside other things)
of his SW. It sounded really strange what he told me.

After he ran a repair on the LV installation everything was fine.

Regards
Heinrich Eidloth

0 Kudos
Message 36 of 53
(1,223 Views)

Heinrich,

 

using dynamic VIs can be tricky for shutting down an application, especially if they are reentrant.

There are some discussions on this forum about reentrant clones running in the background. So in case you might want to look for them.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 37 of 53
(1,218 Views)

@Heinrich-Hans wrote:
Hello Ms. Kurz, I can run the Software in the Development System. No problems. If I put a 'Quit LabVIEW' at the end of the shutdown process, LabVIEW will quit (as expected). Yes, I'm using LV2013 SP1 English. Regards Heinrich Eidloth

After re-reading the thread I think I can offer some help.

 

Lets look at the example so everyone can keep up:

Quit LabVIEW CAR-1_BD.png

 

What we have here is an event structure with one event that fires and sets the value of the stop button to FALSE when the application instance is closed and then tries to close the application instance that was just closed to generate the event (which unloaded the VI from memory anyhow resetting the stop button to the default value saved in the vi!)  In other words the code does not do anything sane.

 

This is not related to the referenced CAR (I'll bet my hat) but silly code that does exactly what it is supposed to do and hopefully we can avoid writing.

 

First we need to understand a little bit about the difference between notify events and filter events.  This event registered is a notify event.  the code in the case will execute when the event is triggered then the event action is taken

 

The Notify event "App instance Close" occurs when you exit LabVIEW through the user interface( File>>Close File Close All,  File>>Exit)  or with the Quit LabVIEW function executing in code.

 

the Filter Event "App instance Close?" occurs for most of the same reasons except the Quit LabVIEW primitive does not trigger a filter event for reasons that really make sense.  Imagine a App instance close? event case with Quit LabVIEW inside it;  (Go ahead try it - the compiler doesn't even throw a warning!) we simply replace the filter event with a notify event and process the notify event.  A little dangerous since the filter event may be registered in other event structures and we may have wanted to pass it to the next event structure but we simply ursurped the filer event with a notify event that downstream customers may not be registered for and which must process before the filter event is passed along  NOTE: I do not have 2013SP1 installed here.  The CAR Resolution may just be to break the run arrow if you attempt this silly thing!

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 38 of 53
(1,205 Views)

@JÞB wrote:

After re-reading the thread I think I can offer some help.

 


Yeah I don't know that I've ever used the non filtering event of the Panel Close.  I'm not even sure I've ever seen any one use the non filtering event.  I always use the Panel Close? event then discard the event and do what I want to clean up, close, hide, or whatever is needed for that window and application.

0 Kudos
Message 39 of 53
(1,195 Views)

Hello all,

ShutdownSW.png

 

the picture will show you the mechanism how I quit my software.

The GUI handles the interaction with the user.
In case of an external event which forces the application to quit (eg. signal from an UPS),
the GUI receives this event and sends the message 'shutdown software' to the main VI.
The 'Application Close' is discarded, because I want to shutdown my software normally
(like pressing a button 'close program').

There are no other event structures with 'Application Close'.

Are there differences between LV2011 and LV2013, because the SW worked in LV2011?

Regards
Heinrich Eidloth

0 Kudos
Message 40 of 53
(1,175 Views)