|LabVIEW 2015 Help|
|LabVIEW 2016 Help|
|LabVIEW 2017 Help|
|LabVIEW 2018 Help|
|LabVIEW 2019 Help|
Owning Palette: Application Control VIs and Functions
Requires: Base Development System
Sets values to the 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 the indexes of the 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 values.|
|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: