Example Code

Search 2D Array of Variants - Connect any Data type

Code and Documents

Attachment

Overview

This VI can accept a variety of 2D arrays for example strings or DBL or I32. When used as SubVI the 2D Array is casted into a 2D array of variants.

You can then select which rows of the input array you would like to search

Description

The VI uses a nested for loop structure to compare each element in an array. It will then output an array of the Rows  and Columns of the matches.

Steps to Implement or Execute Code

  1. Place  Search2D Array - Variants as a SubVI in your code and connect the terminals.
  2. Specify which Row and Column you would like to search or if you want to search the whole array then specify them as -1.

Requirements

Software

LabVIEW 2014

Hardware

Search 2D Array - Polymorphic.png

Additional Images or Video



Kind Regards,
Lucas
Applications Engineer
National Instruments

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

Contributors