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
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?
What invoke node is it and where should it be place..in the subvi?
For the VI, use the Front Panel->Close method.
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.