Up | ScorpionEx.py | SetValue | GetValue | SetConfigValue | GetConfigValue | GetImageMatr | RegisterCallback | RegisterPlugin | RegisterUserManager | PluginChanged | ExecuteCmd | Other

  

SetValue


Sets the value of a tag or tool parameter value.

Syntax:

SetValue(tagname,value)

Note: SetTagValue is an alias for SetValue

SetIntValue(tagname,value)
SetFloatValue(tagname,value)
SetBoolValue(tagname,value)
SetStringValue(tagname,value)
SetResultValue(tagname,pythonObject)

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.

 

Scorpion Vision Software Version: 9.2.0.515 - Date: 20120502
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2012 Tordivel AS.