LabVIEW 2019 introduces the following collection data types for aggregating collections of homogeneous data: set and map.Both types maintain unique elements or entries in sorted order, which allows faster search, insertion, modification, and removal operations on the data than unordered data structures, such as arrays, even when the data size is large.

  • Set—A collection of unique elements of the same data type.


    Element
    Size—Number of elements in the set
    Wires of set—Wire color matches the data type color of the element
  • Map—A collection of entries consisting of key-value pairs where all the keys are unique. The key and value can each be any data type. Maps are also known as dictionaries because the key is used to look up a value.


    Key
    Value
    Entry—A pair of associated key and value
    Size—Number of entries in the map
    Wires of map—Wire color matches the data type color of the value
  • Use the set and map VIs and functions, located on the Programming » Collection palette, and the set and map controls and indicators, located on the Data Containers palette, to create or manipulate sets and maps.

    Note You cannot modify the embedded data in a set or map interactively or programmatically. You can update set or map data only as a whole through operations such as writing to the set or map front panel terminal or right-clicking the set or map and selecting Data Operations » Copy Data or Data Operations » Paste Data.

    Refer to the following VIs and project for examples of manipulating data using sets or maps:

    • labview\examples\Collections\Set Collection - Word Counting.vi
    • labview\examples\Collections\Map Collection - Comparing Test Results.vi
    • labview\examples\Collections\Map Collection - Word Counting.vi
    • labview\examples\Design Patterns\Registration Map\Registration Map Usage.lvproj