SetScalarValue

Sets the values of the specified process variables.

Syntax
SetScalarValue(variable_names,variable_values)
Type
Pulse Python API command.
Description
Sets the values of the specified process variables. The listed variables must be defined in the process prior to running this command.
Inputs
variable_names
The list of names of the scalar variables for which to set the values.
variable_values
The list of new values of the specified variables. The values must be listed in the order corresponding to the list of names.
Example
To set the value of variable Var1 to 5.0 and the value of variable Var2 to 10.0:
var_names = ["Var1", "Var2"]
var_values = [5.0, 10.0]
SetScalarValue(var_names,var_values)
Version History
2021.2