01-25-2010 01:32 PM
Having an odd issue with my executable. Whenthe "Quit LabView" is not used the window will minimize itself in an odd way.
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.
Is anyone aware of the vi properties or project otions that control the behavior of the program after it has stopped running.
Thanks
TsK
01-25-2010 02:20 PM
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.
01-25-2010 03:09 PM
01-25-2010 03:17 PM
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.
01-25-2010 03:44 PM
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
01-25-2010 05:12 PM
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 🙂
01-26-2010 06:45 AM
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.