Converting an Array to a Cluster

You can convert an array to a cluster and use Cluster functions to display the contents of the array.

Complete the following steps to convert an array to a cluster.

  1. Create a 1D array of numeric controls and add five elements. Assign nonzero values to each element.
  2. Add the Array To Cluster function to the block diagram.

     Add  Find
  3. Wire the array to the Array To Cluster function.
  4. Double-click the Array To Cluster function to open the Cluster Size dialog box.
    1. Change the value to 5 to make the cluster size match the size of the array.
    2. Click OK.
  5. Right-click the right side of the Array To Cluster node and select Create»Indicator from the shortcut menu to create a cluster indicator.
  6. Run the VI from the front panel. The cluster indicator displays the contents of the array.
  7. Modify the values in the array and run the VI again. The cluster indicator displays the new values. Change the index display to view different sections of a large or multidimensional array. To set the value of an element in an array, bring the element into view with the index display and then set the value of the element.

You also can convert a cluster to an array.