09-12-2008 04:29 AM
Hi all,
I have a subVI whose front panel is loaded upon calling by a main VI.
I call the subVI using a User-menu event.
the subvi-properties are set to allow close window and i am not handling a 'panel close' event.
The problem is....
when i run the main VI and click on the menu that loads the subVI front panel, subVI window opens, and if i click on the window-close, the main VI hangs.
i understand that the control remains with the subVI only and never returned to main VI after i close subVI panel.
but is it the only way to handle the 'panel close event' or any other way out to solve this?
09-12-2008 05:10 AM
you can change the property of the subvi to disable the close window.
may help? use a boolean in the main vi to close the subvi
09-12-2008 06:10 AM
First, you should check the VI properties (ctrl-I) and window appearance. Check that the close afterwards box is checked.
Next, try running the sub VI on its own and see if there is anything there that is hanging
09-12-2008 10:21 AM
Hey...
yes,the close afterwards box is checked.
i still have the problem...
i think the event in which the subVI is called is not completed when i close the SubVI by 'panel close'. and the subVI is a simple while loop polls for the data and a click either on OK or Cancel.
am i missing something...?
09-12-2008 10:25 AM - edited 09-12-2008 10:30 AM
09-12-2008 11:05 AM
None vi stops running when you close the front panel.
Your sub vi is still running on the backround.
The only way to solve the problem is to handle the front panel close.
(There is another way too, but it is not nice)