LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does all code for tabs in a tab control have to all go in the toplevel block diagram?

Does the code for each tab in a tab control all have to go on the one toplevel block diagram, or can code for each tab be sectioned off somehow?  I want to try and keep my toplevel block diagram as simple as possible.

 

Thanks

0 Kudos
Message 1 of 4
(2,909 Views)

You could 'section' off each code in a tab control in a separate subVI. You could use references to update the front panel controls placed in each tab. I would suggest bundling all controls for a particular subVI and passing that off into the subVI. Have a look at the following link:

How Can I Update the Front Panel of a Calling VI From a SubVI?  

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 4
(2,901 Views)
Thanks for the reply.  With the reference method does the control on the tab still have to be in the main diagram (as opposed to being in the subvi).  Each of my tabs will have 24 controls and I have 6 tabs so wanted to minimize the large no. of controls appearing on the main diagram.
0 Kudos
Message 3 of 4
(2,886 Views)

Yes, that is true. The other method that I would suggest is to use the subpanel contro. For example, you can use a subpanel control to design a user interface that behaves like a wizard. Add the Back and Next buttons to the front panel of the top-level VI and use a subpanel control to load different front panels for each step of the wizard. Have a look at the following:

Loading a Front Panel in a Subpanel Control

 

And, be sure to open Example Finder and search for subpanels.

Message Edited by Adnan Z on 09-06-2009 04:11 PM
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 4 of 4
(2,882 Views)