Example Code

Controlling Sub VI's via VI Server

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

Download All

Overview
This example uses VI server to update control values on multiple sub-VI's, by controlling a single Main VI.

 

Description
Creating a control reference is the ideal way of controlling sub VI's from a Main VI. This example demonstrates using VI Server and Control References in order to update numeric values on several sub-VI's. This can be extended to any data type and is useful if you have multiple instances of a single value occuring on many VI's.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Open Main.vi.
  2. Open recv1.vi and recv2.vi
  3. Browse to paths of two receiving VI's (recv1, recv2) within Array
  4. Run Main.vi and update value of 'Base Number'
  5. Notice that this updates values of both receiving VI's, even though they are not running

 

Additional Information or References
VI Block Diagram

 5-106.png

 

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

 

 


ShalimarA | CLA

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