Example Code

Programmatically Calling subVI without using VI Server 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 demostrates how to call a subVI from a top level application without using VI server calls.


Description

This example demostrates one method to call a subVI from a top level application without using VI server calls. Using VI server is normally recommended; however, if you are distributing an executable and do not want to include the VI file in the support folder this example is an acceptable alternative.

This example uses a global variable to communicate the stop condition from top level VI to subVI.

 
Requirements

  • LabVIEW 2012 (or compatible)

 
Steps to Implement or Execute Code

1. Run VI
2. Press Start SubVI button
3. Press Stop SubVI button

 

Additional Information or References
Top VI Block Diagram

Call subVI Example using LV2012 NI verified.png

 

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

 

Jonah Paul
Marketing Manager, NI Software

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