Example Code

Trigger an Event When Changing the Index Display of an Array using Dynamic Event Registration 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 uses dynamic event registration to trigger an event for changing the index display of an array control.

 

Description

The value of the index display of an array control or indicator is available using a property node.  However, property nodes use VI server and cannot be used to trigger an event in an event structure. 

 

Requirements

  • LabVIEW 2012 (or compatible)

Steps to Implement or Execute Code

1.Update the value of the Event Data control

  1. Change the index of the Sample Array.
  2. The Event Data indicator will change.

 

Additional Information or References
Labview front panel

 1.png

 

 

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

 

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments

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

Comments
Evan
Active Participant
Active Participant
on

For those that find this I accomplised the same result without polling.  Use a mouse down event on your array control.  Then take the mouse coordinates and compare them to the IndexRect to see if it was in the index.