LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating arrays

It is easy to create an array but how do I change the type to a cluster or
some special type that some .vis use. For example the brown shaded types
that seem to appear from time to time. Is it possible to copy the type of
array and duplicate it at another part of the program? ie can I create an
array of any type.


M.P



--
Posted via a free Usenet account from http://www.teranews.com

0 Kudos
Message 1 of 2
(2,589 Views)
Yes, you can create arrays and clusters of any type.
 
An array is an ordered set of identical objects of variable size and dimension, each element is identified by its index alone.
A cluster is a fixed set of objects, each can be of different type. Each element is identified by its label (e.g. (un-)bundle by name) or position in the cluster order.
 
In general, you cannot convert from one to the other, because there are and infinite number of possible clusters topologies and array types. They are generally not compatible. (If arrays and clusters were basically the same, we would not need both ;))
 
If the cluster contains only elements of the same type, you can use "Cluster to array" and "array to cluster" to convert between the two.
 
You can create any type of cluster, either as control, indicator, or diagram constant by placing a cluster container and then dropping the desired elements in it in the desired order (or change the order later). Similarly, you create an array by dropping an object into an array container. Of course each array element could be a cluster and clusters can contain arrays. The possibilities are endless. 🙂
 
If you need a specific cluster to connect to a subVI, simply right-click on the terminal and select "create constat|control|indicator" and the correct construct will magically appear. 😉
 
If you would tell us in more detail what kind of problems you are having (attach a small example VI if you want), we can offer more specific help.
 
 
Message 2 of 2
(2,583 Views)