LABVIEW has many more functions for ARRAYS than CLUSTERS and it is often required to change the array to clusters and clusters to arrays. A cluster can be converted into an array first and converted back to a cluster after performing the required operation from the available array functions. You can convert a CLUSTER with elements of the same data type to an array using the Cluster To Array function as shown in below Figure and use array functions to manipulate the contents. This function cannot be used on a cluster of arrays, since LabVIEW does not allow an array or arrays type of structure.
If you would like to Enrich your career with an Android certified professional, then visit Mindmajix - A Global online training platform: “LabVIEW training” Course.This course will help you to achieve excellence in this domain.
You can convert a cluster with elements of the same type to an array and use array functions to manipulate the contents. Complete the following steps to convert a cluster to an array.
Step 1: Place a cluster on the FRONT PANEL.
Step 2: Place the Cluster To Array function on the BLOCK DIAGRAM.
Step 3: Wire the cluster to the Cluster To Array function.
Step 4: Right-click the Cluster To Array function and select Create» Indicator from the shortcut menu to create an array indicator.
Step 5: Run the VI from the front panel. The array indicator displays the values of the cluster.
You also can convert an array to a cluster using the Array To Cluster function. This function converts an n element, a one-dimensional array into a cluster of n elements of the same type. This function is useful when you would like to display the elements of the same type in a front panel but still want to manipulate the elements on the block diagram by their index values. Clusters do not size automatically, you need to specify the cluster size by popping up on function. The default cluster size is 9, and the maximum size permitted is 256.
The Build Cluster Array function is used to create an array of CLUSTERS where each cluster contains an array. This function does it by first bundling each component input into a cluster and then ASSEMBLING all component clusters into an array of clusters.
The Index and Build Cluster Array function indexes a set of array and creates a cluster array in which the ith element contains the ith element of each input array. All array inputs need not be of the same type and the function yields a cluster array containing one element from each input array
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
|Mar 02 to Mar 17
|Mar 05 to Mar 20
|Mar 09 to Mar 24
|Mar 12 to Mar 27
I am Ruchitha, working as a content writer for MindMajix technologies. My writings focus on the latest technical software, tutorials, and innovations. I am also into research about AI and Neuromarketing. I am a media post-graduate from BCU – Birmingham, UK. Before, my writings focused on business articles on digital marketing and social media. You can connect with me on LinkedIn.
Copyright © 2013 - 2024 MindMajix Technologies