LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Main VI Menu event calling a subVI front panel

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?

 

 

0 Kudos
Message 1 of 6
(3,287 Views)

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 

0 Kudos
Message 2 of 6
(3,278 Views)

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

_____________________________
- Cheers, Ed
Message 3 of 6
(3,266 Views)

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...?

 

 

 

0 Kudos
Message 4 of 6
(3,250 Views)
Try running the VI with highlight execution turned on, and see if anything unexpected is happening, or you could post your vi and let us take a nosey
Message Edited by yenknip on 09-12-2008 04:30 PM
_____________________________
- Cheers, Ed
Message 5 of 6
(3,248 Views)

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)

Message 6 of 6
(3,242 Views)