# system.dnp3.directOperateAnalog Status Code -1

**URL:** <https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [December 11, 2024, 5:05pm UTC](https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693 "2024-12-11T17:05:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haniyeh\_Seyed\_Alinez](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Haniyeh\_Seyed\_Alinez](https://forum.inductiveautomation.com/u/Haniyeh_Seyed_Alinez)\
**Post date:** [December 11, 2024, 5:05pm UTC](https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693/1 "2024-12-11T17:05:18Z")

</div>

Hi everyone,

What does a Status code -1 returned by system.dnp3.directOperateAnalog mean?

Thanks,

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2024, 5:22pm UTC](https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693/2 "2024-12-11T17:22:59Z")

</div>

Looks like one possibility is that a device by whatever you passed in for the `deviceName` parameter does not exist or is disabled.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 11, 2024, 6:40pm UTC](https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693/3 "2024-12-11T18:40:56Z")

</div>

If you're using the new DNP3 driver, as opposed to the legacy DNP3 driver, be aware that the script function namespace is `system.dnp` and not `system.dnp3`.

---

<div class="post-metadata">

**Author:** ![Haniyeh\_Seyed\_Alinez](https://avatars.discourse-cdn.com/v4/letter/h/e99b99/32.png) [@Haniyeh\_Seyed\_Alinez](https://forum.inductiveautomation.com/u/Haniyeh_Seyed_Alinez)\
**Post date:** [December 11, 2024, 7:12pm UTC](https://forum.inductiveautomation.com/t/system-dnp3-directoperateanalog-status-code-1/99693/4 "2024-12-11T19:12:42Z")

</div>

Thanks for the information @Kevin.Herron .

The issue was related to the data type mismatch between the value passed to the function and the AO defined in the device. I am using Legacy dnp3 driver.
