LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executable process persist after X (closing) window

Using the X to close an executable or File/Exit menu, does this make a difference? It appears so.

 

I acquired an application executable to upgrade and whenever I close this executable, using the OS window X mouse click, it will persist in the Task Bar. As a result, I must open the OS task manager and stop the Process in order to start a fresh start. But, if I use the LV menu, File/Exit (Ctrl+Q), to close the executable everything closes as normal, gone from task bar. Is this occuring because the code doesn't close references, visa ports, instruments etc? What is a fix.

0 Kudos
Message 1 of 24
(4,550 Views)

The windows X button is not fully supported in labview. An event structure can detect when you are pressing the X button. See attached vi!

0 Kudos
Message 2 of 24
(4,549 Views)

You have to implement actions when closing the window using the X button. There's no automatic link to a quit menu item or similar. If you want the same behavior with X and quit you have to implement it that way using the event as sandal mentioned.

 

 

0 Kudos
Message 3 of 24
(4,544 Views)

Hmmm, not sure if I agree that this is the way LV works. Oh yes there is application close event of course that I believe Sandal mentions. I work with many a executable and none of them required expicitly closing the VI except this one of course. I'll continue my search.

0 Kudos
Message 4 of 24
(4,535 Views)

To press the X button without implement the close action is the same as pressing the red abort button in your programming environment. You are aborting the code flow without closing references, and other things you do "after" the while loop.

0 Kudos
Message 5 of 24
(4,523 Views)

You guy are talking about a running executable and I add an event to handle when the executable closes, i.e. a running VI.

 

If your ideas are correct why does this occur when the executable is open but not running and I click X to close. The way I understand, the LV application closes and is removed from the task bar by the OS. Obviously, the OS still sees a process running or open in the application, as a result, it will fail to close the labview process and thus persist in the task bar.

 

I only have this problem on this executable.

0 Kudos
Message 6 of 24
(4,510 Views)

@richjoh wrote:

You guy are talking about a running executable and I add an event to handle when the executable closes, i.e. a running VI.

 

If your ideas are correct why does this occur when the executable is open but not running and I click X to close. The way I understand, the LV application closes and is removed from the task bar by the OS. Obviously, the OS still sees a process running or open in the application, as a result, it will fail to close the labview process and thus persist in the task bar.

 

I only have this problem on this executable.




Exactly!.  this is why so many projects contain a case srtucture switched by the vi server property "app kind" to quit the app instance if app kind is Run Time Engine.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 24
(4,508 Views)

Are you suggesting I use app kind property to fix this issue?  If so, will this fix the issue of a not running but open executable and close it using X?  I've used app kind before to label the executable version in the title bar per an NI zone paper.

0 Kudos
Message 8 of 24
(4,505 Views)

I can't post example code today but, yes.  on filter event app close? or front panel close? if app kind is RTE discard the event, run cleanup code and call the Quit Application primitave (that we all love to hate):smileywink:

 

File>> Exit is an App close event the windows X is a panel close event


"Should be" isn't "Is" -Jay
Message 9 of 24
(4,503 Views)

OK, Jeff your statement makes sense now (to me). I do the panel close, if RTE discard event and Quit App. I'll put this in later  when time permits and post the result.

 

Thanks for the response.

0 Kudos
Message 10 of 24
(4,499 Views)