LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exe minimizes on completion and cannot be restarted

 Having an odd issue with my executable. Whenthe "Quit LabView" is not used the window will minimize itself in an odd way.   

 

 

untitled.PNG

 

At this point it will refuse to resize and the run button wont come back, so the user is forced to exit the software complety and restart it.  

 

 

untitled2.PNG

 

Is anyone aware of the vi properties or project otions that control the behavior of the program after it has stopped running. 

 

Thanks 

 

TsK

0 Kudos
Message 1 of 7
(3,073 Views)

It is common to use the quit labview when using the exe.  Many use a function that is wuit if in exe, that uses the app.kind to close labview if in the exe but is cased out in the development environment.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 7
(3,065 Views)
Yes, that's a good way to go but we need the option for the user to restart the application without completely restarting it.  I have now also tried using the invoke node, FP.Close, it still minimizes the front panel. 
0 Kudos
Message 3 of 7
(3,057 Views)

tsksesa, I think you have a race condition in your code - look: the exit vi and user dialog vi aren't sequenced. The exit vi might execute prior to dialog box and cause the problem. Put the exit vi in a separate sequence frame right after the dialog and see if it helps.

 

0 Kudos
Message 4 of 7
(3,054 Views)

That helped a bit, now the full front panel is displayed but, no run button and you can not resize the window by more than a little bit. 

 

Getting warmer

0 Kudos
Message 5 of 7
(3,042 Views)

okay, this is strange. When you execute Quit LabView vi your application should unload regardless if it is executable or development option. If the window still hangs there it might be trying to close some open external references suggesting that you need to do some proper cleanup before you plan to exit your app.

 

Was your intention to use a dialog box as a user input whether to quit or continue to run? In that case you would need to put entire code inside while loop, connect boolean output from dialog box to loop control and to LV Quit vi input. And don't forget to add some 100ms wait timer to the loop. Do your main task in a sequence frame just before Quit decision. Hope that helps 🙂

 

0 Kudos
Message 6 of 7
(3,031 Views)

It is hard to tell from your code the image is vary small, but a state machine for rerunable code is a nice way to go,

Initialize->run sequence

if done, Prompt to rerun

if yes run sequence else

run shutdown (close all resources turn off devices)

Last if exe then quit labview.

 

This is much more elegant then ending the application and having the user rerun from the toolbar.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 7 of 7
(2,999 Views)