Detect Array Element Value Change in LabVIEW

Updated Aug 21, 2023

Reported In


  • LabVIEW

Issue Details

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


There is no built-in LabVIEW function to achieve described functionality. However, you can get a changed value index from the array by implementing this simple code.

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. Index at which For Loop stops iterating is the actual control array index with the new value.

Additional Information

Attached code is a VI Snippet made in LabVIEW 2018. You can save it to the disk and then drag and drop on your VI Block Diagram.