12-14-2016 06:59 PM
Hi Everyone,
I have been working on this concept for a couple of days but I dont seem to get to where I want.
I have made a customed run time menu to a MainVI that is able to call 2 subVIs Z-Control and GraphSignal.
I can call the subVIs and then open them, both from the MainVIs menu tab while running (Module-MainSettings-GraphSignal) and the PopUp button. But when I close the subVIs front panel, I cannot open them again from the PopUp button or the mainVI menu tab.
I have played around with Vi properties, VI Call Setup and SubVI Node Setup but in vain. My code is attached. I use labview 2011.
What am I not doing right? Any suggestions will be highly appreciated.
12-15-2016 12:26 AM - edited 12-15-2016 12:38 AM
(Some of the ) problems to fix:
The reason you cannot open dynamically your subVIs after the first successfull open is that, you just did not program any stopping mechanism for these VIs! So when you close these subVIs via the top right "X" symbol, the only thing happens is you close its window Front Panel, but the VI is still running in memory. So when you try to open it second time of course nothing happens: it is still running with closed front panel.
You need to program a proper stopping mechanism for these subVIs, like using the template "Dialog Using Events". Here you could use the "Panel closed?" event to capture when the user wants to stop the VI...
EDIT: very important: never use the red "Abort" button to stop your VIs! Always program a stop properly! See this example for a main VI Event loop (no need for that Stop button, just use the "X" to stop the VI running):