Sets the value of a
tag or tool parameter value.
The optional valid parameter is appliable for tool results only.
Syntax:
SetValue(tagname,value)
Note: SetValue replaces SetTagValue
SetIntValue(tagname,value[,valid=true])
SetFloatValue(tagname,value[,valid=true])
SetBoolValue(tagname,value[,valid=true])
SetStringValue(tagname,value[,valid=true])
SetResultValue(tagname,pythonObject[,valid=true])
Note: SetResultValue shall only used to write python results - the python object is converted to a string. The string can be read by GetResultValue
SetTagValue(tagname,value[,valid=true]) - obsolete
SetValid(tagname,valid)
Note! optional valid parameter is available from Scorpion 9.3.0.528
Example 1: Calculate dynamic threshold
# read lightmeter min value result
min = GetIntValue('Lightmeter.Min');
# writes the Threshold value to min plus 25
SetIntValue('Threshold.Value',min+25)
Example 2: Set Scorpion State
SetBoolValue('System.Running', 1)
Note:
TagValues can be browsed using the Parameters browser available in the
Python Editor or in the command property page.
The Values can be copied using the copy button to the left of Close and
then be pasted into the python editor to avoid typing errors. If a tagname
do not exist. An error message is shown in the Scorpion System Log.
|