From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Load Two Subpanels with Same VI Using VI Template (*.VIT)

Code and Documents

Attachment

Overview

This is a very basic example on how you can load one template VI into two sub panels of the same front panel

 

 

Description

For a modular and flexible coding sometimes you would like to create a VI template then call this template with a different configuration to perform different functionalities. This VI calls a VI template Simulate Signal.vit that can generate a sine or a cosine signal. Then using invoke nodes you pass the parameters to the VI by accessing its reference to determine its execution mode.

 


Requirements

LabVIEW 2012 (or Compatible)

 

 

 

Steps to Implement or Execute Code

1. Download the folder "Load Multiple panels_LV2012_NI Verified"

2. Open the project and run the Main VI

3. Notice how in each panel you have a different signal being generated
4. Stop Execution in both SubPanels 

5. Open the Simulate Signal.vit from the subVIs folder in the project explorer to check the template

 

 

Additional Information or References

BD.PNG

 

FP.PNG

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Dan Richards
Certified LabVIEW Developer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Eric_Pope
Member
Member
on

To get your subpanels active add two invoke nodes that call the run methods of the SubPanel VIs.