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

We appreciate your patience as we improve our online experience.

Example Code

Send Control Values to Dynamically Called VI

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


  • LabVIEW

Code and Documents




This example demonstrates how to set and get values from controls and indicators of a dynamically called VI.



LabVIEW can link to subVIs by two different methods:

  • Static
  • Dynamic

Statically linked subVIs are the normal subVIs that are dropped on the block diagram of the main VI. A statically linked subVI is loaded into memory at the same time the main VI is loaded.

With dynamic linking, subVIs are not loaded until specifically instructed by the code of the main VI. This enables the programmer to create applications which can exchange parts of the application during run-time.

This example shows one way to exchange data between the caller and the callee. To do so, the property node Set Control Value and Get Control Value is used.




  • LabVIEW Base Development System 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)


  • No hardware is necessary to use this example VI


Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open and run the [Main] ...VI


Additional Information or References

Transfer Values To And From A Dynamically Called VI - Front Panel.png


Transfer Values To And From A Dynamically Called VI - Block Diagram.png


Note: This example shows one possible way to transfer data to and from a dynamically called VI.
Depending on your application, there are many other ways to accomplish the same functionality with less effort.
Take a look into this documents:

Differences Between Calling a VI with an Invoke Node and Calling a VI with a Call by Reference Node

Asynchronously Calling a VI without Collecting the Results - LabVIEW Help


**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**


Jon S.
National Instruments
LabVIEW NXG Product Owner

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