Example Code

Fire an Event in subVI 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 shows how to fire an event in a subVI using VI Server.

 

Description

This example shows how to fire an event in a subVI using Vi Server. The main Vi dinamically launches the subVI using VI Server. It then toggles the boolean in the subVI using VI Server as well. To trigger the event i get a reference to the front panel of the subVI. I then get an array of the controls on the front panel. The index for the toggle button in the ssubVI is 1 so I index into the array of controls. I then write the boolean value to the value (signaling) property node of the control in the subVI. Non that for the example works correctly both VIs must be in the same folder.

 

Requirements

  • LabVIEW 2012 (or compatible)

 
Steps to Implement or Execute Code

1. Run VI
2. Press Launch subVI
3. Press Fire Event In subVI

 

Additional Information or References

Main VI Block Diagram

 Main LV2012 NI verified.png

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

Bryan H.

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