Example Code

Stopping a SubVI and Main VI Programmatically 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 VI demonstrates how the main VI can call the subVI and stop it.

 
Description
Here is a brief description of the example:

The subVI generates a sample sine wave which will pop-up. The VI and Main VI can be stopped by pressing the stop button on the front panel of the main VI.

 

Requirements

  1. LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Run the main VI
  2. Choose the SubVI
  3. The subvi is run
  4. Click the "Stop SubVI"button
  5. The Subvi is closed

 

Additional Information or References

VI Snippet

Main VI:

main 2013 NIVerified.png

SubVI:

Sine subvi 2013 NIVerified.png

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

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