Detect Array Element Value Change in LabVIEW

Updated Feb 10, 2026

Reported In

Software

  • LabVIEW

Issue Details

I would like to be informed which element in an array has its value changed. How to get the desired element index?

Solution

There is no built-in LabVIEW function to achieve described functionality out of the box. However, you can get the changed value index from the array by implementing the following simple logic.

 

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.

The OldVal Event Data Node stores a previous control value. You can use it to compare new data and retrieve the changed index by iterating through arrays with enabled Conditional Terminal. At the end of execution of the For Loop, you will receive array of index indicating which element(s) has their value changed.

Additional Information

This approach can be used on other data types too, such as string array, boolean array, cluster array and more.