Example Code

Compare 1D Arrays 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

Download All

Overview
This VI will compare two different 1D arrays and determine what elements the two arrays do not have in common.

 

Description
The logic compares the second array to the first array in a similar manner to source code control comparison. In other words, if you wire an old array and then a new array that has been changed from the initial array, it will return what elements have been added or removed.

 

Requirements
LabVIEW Base Development System (or compatible)

 

Steps to Implement or Execute Code
1. Set values on the Old Array and Modified Array controls
2. Run the VI
3. Verify which values were removed and added to the Modified array


Additional Information or References
Snippet.png

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

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