--- title: "system.dnp3.directOperateAnalog" description: "Issues a Select-And-Operate command to set an analog value in an analog output point." --- # system.dnp3.directOperateAnalog > Issues a Select-And-Operate command to set an analog value in an analog output point. :::note The following function uses [system.dnp3](appendix\scripting-functions\system-dnp3\system-dnp3.md) and the [Legacy DNP3 driver](ignition-modules\opc-ua\opc-ua-drivers\dnp3\legacy-dnp3-driver\legacy-dnp3-driver.md). See [system.dnp](appendix\scripting-functions\system-dnp\system-dnp.md) for [DNP3](ignition-modules\opc-ua\opc-ua-drivers\dnp3\dnp3.md) functions using the [DNP3 driver](ignition-modules\opc-ua\opc-ua-drivers\dnp3\dnp3-driver\dnp3-driver.md). ::: This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions [Permission Type](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties): 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](system-dnp3.md#status-codes) of the response, as an integer. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="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) ``` ```python title="Example #2" # This example shows setting the analog output at index 2 to the # Integer value 300 system.dnp3.directOperateAnalog("Dnp3", 2, 300) ``` ```python title="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, 2) ``` ```python title="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", 1, 15, 3) ```