04-05-2018 01:11 PM - edited 04-05-2018 01:28 PM
@crossrulz wrote:
Just thinking about this again. Your problem might be that you already had the subVI open before you started running the main VI. If that is the case, then the subVI will not close since the setting is "Close if previously closed". You can use an invoke node to close the panel.
Calling the Quit LabVIEW primitive in the
in the exit VC case is probably NOT a good idea 😉
And yes, the windows apperance properties do have the close if originally closed option selected so it won't close unless the close method is involked
Interestingly, the unwired cluster ref is going to cause a runtime error and since it is unhandled and automatic error handling is enabled. LabVIEW can't quit while the error dialog is open and modal and possibly off screen
04-06-2018 04:16 AM
yes yes, thanks for pointing this out. I forgot about that setting. I can run it now. What invoke node is it and where should it be place..in the subvi?
04-06-2018 04:29 AM
so what do you suggest about the exit VC? is it better to have no exit button and exit VC?
04-06-2018 06:32 AM
@quadratini26 wrote:
What invoke node is it and where should it be place..in the subvi?
For the VI, use the Front Panel->Close method.
04-06-2018 06:34 AM
@quadratini26 wrote:
so what do you suggest about the exit VC? is it better to have no exit button and exit VC?
The Exit LabVIEW is just a bad way of stopping your applications. It is the same as pressing the Abort button in the toolbar. You need to perform a proper shutdown (put equipment into a safe state, close out all files and references, etc). So have an output of the subVI telling the main VI to not run. You can then perform a proper shutdown and just close the front panel of the main VI and everything will close out nicely.