LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble closing sub Vis

I have a main vi.  And from its front panel, I can open different sub vis.  I click on each sub vi and went to sub vi node setup.  For each one I selected Show Front Panel when Called and Close afterwards if orginally closed.  Whenever I try to run a sub vis,it runs completely through and it still doesn't  close.  I even put a while loop around my whole su vis' block diagram, but whenever I click the stop button it just stops execution.  How can I be able to click on different sub vis fron my main vi front panel and have them close after I am done with the sub vi and then return back to the main vis front panel while it is all still executing?
0 Kudos
Message 1 of 4
(2,198 Views)
Look at the name of this setting - "Close afterwards if originally closed". If the subVI's FP was open when it started running it won't close. If it was closed, it will close again once it finishes executing, so make sure the FP is closed before you start running the subVI.

___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,194 Views)
I close all of the sub vis before I begin executing.  Is there a way that I can make a button so when I am finished with the sub vi I can press it. 
0 Kudos
Message 3 of 4
(2,193 Views)
There are 2 kinds of subVIs - one is the VI that performs a specific function and outputs the results and the other is called once and runs continuously. If you want the top VI loop to continue running while the subVI runs, you need to place it in another loop or run it dynamically using the Run VI method and set Wait Until Done to F. If you do run the subVI in another loop, you can open its FP by double clicking its icon in the BD (while the VI is running), or by setting its FP.Open property to T. You can close it by setting the property to T. Search the example finder and this site for property nodes to see how to work with them.
 
If this didn't help, I suggest you save your VIs as an LLB and post them with some more details of what you want to do.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,188 Views)