Example Code

VI Reference to open new VI Asynchronously 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 VI shows how to asynchronously open a new VI reference. Both VI's in this case will continue to run separately and uninterrupted.


Description

In order to simultaneously run a VI that is called from within a different VI without interrupting the main VI, you can use VI references and asynchronously call the new VI. This allows you to create a reference to the separate VI, specify how you want that VI to open and act once it is open, and if you use the "Start Asynchronous Call' VI, you can open the VI without halting the data flow on the block diagram of the main VI. This method lets you customize the interaction of your VI's.


Requirements

  • LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Change the file path on the block diagram of the Main Chart.vi to reflect the location of the Reference Chart.vi on your computer.
  2. Run the Main Chart.vi. Notice the graph updating.
  3. Click on the Open Graph Window button.
  4. Click on the start button on the new Reference Chart.vi window that opened.
  5. Notice that the two VI's are running completely separately. 

 

Additional Information or Reference

VI Block Diagram

1.png

Asynchronous Running
2.PNG

 

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

Stephanie S.
Application Engineer
National Instruments

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