system.dnp3.directOperateAnalog
note
The following function uses system.dnp3 and the Legacy DNP3 driver. See system.dnp for DNP3 functions using the DNP3 driver.
This function is used in Python Scripting.
Description​
Issues a Select-And-Operate command to set an analog value in an analog output point.
Client Permission Restrictions​
Permission Type: DNP3 Management
Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.
Syntax​
system.dnp3.directOperateAnalog(deviceName, index, value, [variation])
Parameters​
Type | Parameter | Description |
---|---|---|
String | deviceName | The name of the DNP3 device driver. |
Integer | index | The index of the object to be modified in the outstation. |
Numeric | value | The analog value that is requested (of type int, short, float, or double). |
Integer | variation | The DNP3 object variation to use in the request. |
Returns​
Integer - The DNP3 status code of the response, as an integer.
Scope​
Gateway, Vision Client, Perspective Session
Code Examples​
Example #1
# This example shows setting the analog output at index 0 to the
# Double value 3.14
system.dnp3.directOperateAnalog("Dnp3", 0, 3.14)
Example #2
# This example shows setting the analog output at index 2 to the
# Integer value 300
system.dnp3.directOperateAnalog("Dnp3", 2, 300)
Example #3
# This example shows setting the analog output at index 15 to the
# Short value 33. The value sent in the request is converted
# for the object variation, 2.
system.dnp3.directOperateAnalog("Dnp3", 15, 33.3333, variation=2)
Example #4
# This example shows setting the analog output at index 1 to the
# Float value 15.0. The value sent in the request is converted
# for the object variation, 3.
system.dnp3.directOperateAnalog("Dnp3", index=1, value=15, variation=3)