Example Code

How Do I Control a VI Inside a Subpanel?

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 VI show how to control properties of a VI inside a Subpanel

 

Description
After inserting a VI inside a subpanel, there are ways to actually control what happens on that VI. One of this ways is to use a VI reference to the objects inside the VI in question. This example inserts a VI (that contains a waveformgraph) in the subpanel of a main VI. Then a VI reference is created within the main VI to control the Y scale of the waveformgraph of the VI inserted on its subpanel. In other words, a property of a VI inserted in a subpanel of another VI can be changed. In this case the property is the Y scale of a waveformgraph.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the program "control VI inside Subpanel LV_2012_NI_Verified.vi"
  2. Change value of Graph Y Scale Maximum Control and see results

 

Additional Information or References

VI Block Diagram

Control VI inside Subpanel LV_2012_NI_Verified.png 

 

subpanelobjref.png

 

Additional Notes

Make sure that subVi.vi is NOT open when you run subpanelobjref.vi. You will get an error if it is open.

 

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

Regards,
Efrain G.
National Instruments
Visit http://www.ni.com/gettingstarted/ for step-by-step help in setting up your system.

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

Comments
Hefelump
Member
Member
on

how do you change an input string according to this code example?