Cluster Parameters - LabVIEW VI Call Parameters
- Updated2024-10-09
- 2 minute(s) read
Cluster Parameters - LabVIEW VI Call Parameters
Cluster Parameters
When you configure calls to VIs that use clusters as parameters, you can specify that each cluster element maps to a different TestStand expression or that the entire LabVIEW cluster maps to a TestStand data type.
You can create a custom data type that matches a LabVIEW cluster . When you create or edit a data type, you specify whether the type can be a cluster argument and how the properties of the type map to the cluster. The mapping is done between the cluster element label and the name of a property of the data type.
For input parameters, you can pass the default value for the entire cluster or the default values for specific elements of the cluster control on the front panel of the VI. For output parameters, you can optionally specify where TestStand stores the cluster value or specific elements of the cluster value.
The mapping eliminates the need to specify an argument for each element of the cluster. You can create the new data type and the mapping to the cluster directly from the LabVIEW Module or Module tab of the Edit LabVIEW VI Call dialog box by clicking the Create/Update Custom Data Type button in the Type column of the VI Parameter Table to launch the Create/Update Custom Data Type from Cluster dialog box.
You can use the Create/Update Custom Data Type from Cluster dialog box or the Cluster Passing tab in the Type Properties dialog box to edit the cluster passing settings for an existing custom data type.
Passing Complex Arrays of Clusters
When you use several VIs with a complex array of clusters that is not used in TestStand, complete the following steps to use the LabVIEWClusterArray data type, which adapts to the array of clusters as needed.
- Use the LabVIEWClusterArray data type as an output expression that TestStand uses to adapt the data type to fit the array of clusters.
- Pass the data type to the remaining VIs as an input.
Specifying Each Cluster Element Individually
To configure each cluster element individually, specify a different TestStand expression for each element of the cluster. The following figure shows a VI Parameter Table in which the data source for the Number element of the Input Cluster parameter is a local variable. TestStand passes the default value for the String element of the Input Cluster parameter.
See Also
Create/Update Custom Data Type from Cluster dialog box
Partially Specifying LabVIEW Clusters
Passing a LabVIEW Cluster to a VI (Example)