Example Code

Index Cluster with Event Structure in 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 is an example that demonstrates how you can create a event structure based on a value change in a cluster.  The VI then extracts the index of the element in the cluster whose index was changed.  

This example is useful because extracts the index of the element in the cluster that has been changed.

 

Description

Use Event Structure to handle any value change in the cluster elements. The property node Controls[] of Old Values and New Values allows to compare both and determine which element of the cluster has changed.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run VI
  2. After running the VI, change the value of one of the controls in the cluster on the front panel.  The index of the control you modified will be displayed in the control to the right

Additional Information or References

Snippet 3492.png

 

 

 

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

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer

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