LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subpanel insert and connector pane

Hello,
I have a program with several subpanels.  Right now, I use variables for passing the data between the main program, and the subpanel vi's.  Well, I've had some strange behavior, and I'm guessing it's because variables upset dataflow.  So I plan to get away from variables entirely. 
 
The question: Can I somehow use the connector pane?  I know it's easy to do when you place subvi's on the block diagram.  But I don't want pop open windows.  The subpanels are really nice and clean. I've seen the Set and Get vi methods, but I wonder if it's similar to using variables. 
Thanks,
Pat
0 Kudos
Message 1 of 5
(3,564 Views)
That is exactly what the connector pane is for, to pass data to and from subvi's.  Subvi's are not supposed to pop-up unless you specifically tell them to.  Put a subvi in your main and you will see that it doesn't pop up, that is unless you have it set to show when opened.  If so, just disable that feature.  Click on File - Vi Properties.  In VI Properties window, select the Windows Appearance catagory.  Select the Default button, or if you must customize, select the Custom button.  In the Customize window, deselect the buttons Show Front Panel When Called and Show Front Panel When Loaded.
- tbob

Inventor of the WORM Global
Message 2 of 5
(3,557 Views)
tbob, Thanks for the reply.  In this case, I actually want to see the vi because it's basically a big dialog box.  It allows the user to input to a bunch of different controls on it's front panel.  But I want to appear in a subpanel as opposed to its own window.  Does that make sense?  I can definitely accomplish what I want by using the connector pane and making the vi visible when called, but I like keeping things inside of the subpanels.
Thanks,
Pat
0 Kudos
Message 3 of 5
(3,552 Views)
You can use the Call by Reference node (also in the application control palette) which will let you use the connector pane, but this will mean that you have to wait until the VI finishes executing before your code continues running, just like a regular subVI. The other option, as you mentioned, is using the Set Control Value method.

___________________
Try to take over the world!
Message 4 of 5
(3,546 Views)

tst, Thanks, I just tried that and I see that it makes the connector pane available.  I'll have to play with it to make it work in the subpanel, but it doesn't look too tough.  No more variables for me.

Pat

0 Kudos
Message 5 of 5
(3,534 Views)