Owning Palette: Application Control VIs and Functions
Requires: Base Development System
Sets values to one or more controls for the VI you reference. This function offers better performance than VI Server objects that write to the terminal of a front panel control, such as using the Value property in the Control class. However, this function requires more advanced application design than other methods for setting control values.
|VI Refnum specifies a reference to the VI for which you want to set multiple control values. You can wire a strict or non-strict reference to this input. The default is a reference to the current VI.|
|control indexes specifies a single control index or an array of indexes of front panel controls for which you want to set values. Use the Control Index property in the Control class to retrieve control indexes.|
|data values specifies the values to write to the controls. The default is a variant, but you also can specify the data type for the values you want to write to the control. To specify a single control, wire a scalar index to control indexes and wire a single value to data value.|
|error in describes error conditions that occur before this node runs. This input provides standard error in functionality.|
|error out contains error information. This output provides standard error out functionality.|
The Set Control Values by Index function requires that the VI for which you want to set control values is running or in run mode. Furthermore, the controls for which you want to set values must have terminals on the block diagram.
|Note Because controls nested within clusters or arrays do not have terminals on the block diagram, you cannot set values for those controls.|
This function iterates over the length of the shorter of the two arrays you wire to control indexes and data values. The function attempts to set all values and does not stop on the first error. If an error occurs for multiple indices or values, LabVIEW reports only the first error.
Use the following recommendations to obtain the best performance when you set control values with this function: