There are three options to control the behavior of a SubVI front panel:
- Set the VI to open its front panel whenever it's called
If you want the behavior of the SubVI front panel to be the same each and every time it is called, then you will want to modify the Window Appearance properties of the SubVI.
- On the block diagram of the top-level VI , double click on the SubVI icon to open.
- Open the SubVI's properties by doing one of the following:
- Go to File»VI Properties
- Right-click on the SubVI icon in the top, right-hand corner of the front panel or block diagram and choose VI Properties
- On the SubVI, Press Ctrl+I
- In the Category drop-down menu choose Window Appearance
- Click the Customize... button
- Here you will find three options in the bottom left for controlling the behaviour of the SubVI front panel:
- Show front panel when called - opens the front panel when the SubVI is executed
- Close afterwards if originally closed - closes the front panel when the SubVI finishes execution
- Show front panel when loaded - opens the front panel when the SubVI is loaded into memory
- If you want to open the front panel of a specific SubVI instance
If you want the SubVI front panel to open when you call it, you will have to configure the top-level VI. This second method is useful if your SubVI appears in your top-level VI several times and you only want it to open the front panel some of the time.
- From the block diagram of the top-level VI, right-click on the SubVI and choose SubVI Node Setup.
- In the SubVI Node Setup, you will find four options for controlling the behaviour of the SubVI front panel:
- Open Front Panel when loaded - opens the front panel when the SubVI is loaded into memory
- Show Front Panel when called - opens the front panel when the SubVI is executed
- Close afterwards if originally closed - closes the front panel when the SubVI finishes execution
- Suspend when called - halts execution and allows user to run the SubVI any number of times
- Programmatically decide if the front panel opens at Run-Time
To programmatically determine whether the front panel loads or not during run-time you can use invoke nodes on the block diagram of the SubVI to control the front panel behavior.
- Create a VI Server Reference on the block diagram for a constant OR create a VI Refnum on the front panel of the SubVI.
- Place an invoke node and choose the Front Panel » Open or Front Panel » Close methods to open and close your front panel.
- The image below shows how to programmatically open and close the front panel of a SubVI. The false case of each case structure contain no functions.
Additional Information
If you are using the Start Asynchronous Call VI, be sure that its connector pane matches the connector pane of the VI you are calling. Read more about
Asynchronously Calling a VI and Collecting the Results in the LabVIEW Help.