Example Code

Subpanels with Communication Between VIs Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates the ability to run one VI inside of another VI with a subpanel and have these VIs send and receive data to each other.

 

Description

The Main VI contains a subpanel inside of which the Auxiliary VI is displayed and started. The Main VI sends a user-controlled waveform type to the Auxiliary VI which is the displayed in the subpanel. Additionally, the Auxiliary VI sends user-incremented or decremented tank level values to the Main VI which contains a front panel level indicator.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Be sure the project and its dependent VIs are all in the same directory.
  2. Be sure the Auxiliary VI is closed (if it's open, the subpanel with not display it).
  3. Run the Main VI.
  4. Change the Waveform Type or Increment/Decrement the tank values and observe the changes.

 

Additional Information or References

Front Panel of Main.vi 

Main Front Panel.PNG

Block Diagram of Main.vi

sni.png

 

 

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

Rick C.

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