Display or Use Multiple SubVIs in Main VI Front Panel

Updated May 29, 2018

Reported In

Software

  • LabVIEW Professional
  • LabVIEW Full

Issue Details

I want to interface with the front panel of one or more of my subVIs in my program, but when I call them, each subVI shows up as a new window on my computer screen. How can make each subVI be part of my Main VI Front Panel so I do not have as many windows on my screen?

Solution

You can use subpanel controls to do this. Also known as a child window, a subpanel control is a container that allows the front panels of multiple subVIs to be displayed on the front panel of one main VI rather than opening several individual subVI windows that may become hidden behind one another. The subpanel control also allows users to view and interact with the front panel of subVIs in Remote Panel applications.


In LabVIEW 2011 and later, you can find subpanel controls in the Controls»Modern»Containers palette. For step-by-step instructions on how to create a VI that uses a subpanel control, refer to LabVIEW Help: Loading a Front Panel in a Subpanel Control.

Additional Information

LabVIEW includes a shipping example, Multiple VIs in a Subpanel.vi, which demonstrates how to use subpanel controls. You can find it in the LabVIEW Example Finder by selecting Help»Find Examples..., and on the Search tab, enter subpanel as your keyword in the Enter keyword(s) text box. You can also find an example on using Subpanels in the NI Community : How to use subpanels to display different subVI front panels within a single host VI.

Things to keep in mind when using subpanel controls:

  • The subVI must not be in memory when the main VI is run.
  • Inserting the subVI into the subpanel does not automatically run the subVI, even if Run when Opened is selected in VI Properties. You must use VI Server methods to run the subVI.
  • The subVI front panel is only displayed in the subpanel container when the main VI is running. When the main VI is stopped, the subVI's front panel is removed from the subpanel control.
  • Subpanel controls are included in the LabVIEW Full and Professional Development Systems. If a VI contains a subpanel control, you can run the VI in all LabVIEW packages, but you cannot configure the control in the Base Package. In the Full Package, the subpanel control can be placed on the front panel, but some of the configuration properties are not available (i.e. scrollbars and frame visible items).
  • When building an application with subpanel control, Use relative directory path when configuring the control and make sure to include the VI in under Always Included.

WAS THIS ARTICLE HELPFUL?

Not Helpful