07-07-2005 11:18 AM
07-07-2005 11:28 AM
There is no easy all encompassing answer to your question. Clusters are used when you need or want to pass a number of values of different types (char, int, real, etc.) together, possibly to form an association between them, sometimes just for the convenience (a cluster only needs one terminal on a connector pane). Arrays can be thought of similarly, grouping a variable number of values together, but they must all be the same type (char OR int OR real, etc.). Arrays frequently occur "naturally", for example the output of a data acquisition frequently is an array of numbers, representing the individual or multiple readings from a single or multiple channels. This doesn't really begin to describe when, where and why you would use these constructs, that will be something you will discover as you develop your LabVIEW programs. Keep asking questions, none of us was born knowing LabVIEW (with the exception of a few contributors here that seem to have!)
P.M.
07-07-2005 11:33 AM
Arrays are a set of elements defined by element type and number of dimensions. (e.g. a 2D boolean array or a 1D array of DBLs or a 3D array of a cluster).
Clusters are a collection of obects that can be of different type. You could e.g. have a cluster containing a string, a boolean, and an array of numbers. Clusters are fixed, you cannot add or remove elements at runtime.
Typically, clusters are used to simplify wiring by keeping related objects together.
You would use arrays e.g. for your measurment data. You can directly operate on them, e.g. add a constant, multiply with another array or take the fourier transform to calculate a new array. And so on ....
07-08-2005 08:53 AM
07-08-2005 08:53 AM
07-08-2005 09:20 AM