# DNP3 Fail to Write via Script

**URL:** <https://forum.inductiveautomation.com/t/dnp3-fail-to-write-via-script/114651>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [March 24, 2026, 7:52pm UTC](https://forum.inductiveautomation.com/t/dnp3-fail-to-write-via-script/114651 "2026-03-24T19:52:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrei.veremeenko](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@andrei.veremeenko](https://forum.inductiveautomation.com/u/andrei.veremeenko)\
**Post date:** [March 24, 2026, 7:52pm UTC](https://forum.inductiveautomation.com/t/dnp3-fail-to-write-via-script/114651/1 "2026-03-24T19:52:57Z")

</div>

Hello,

We have created a script to use the LatchOn command for a DNP3 BinaryOutput0 in Ignition Designer. The manual write command from Ignition tag browser to the DNP3 Slave works and you can trace the packets in the WireShark, which I have attached. However, our `system.dnp.directOperateBinary` script when pushing the button does not work. Here’s the script:

```python
def runAction(self, event):

	system.dnp.directOperateBinary(
		deviceName="RTAC",
		index=0,
		tcc=0,
		opType=3,
		count=1,
		onTime=5000,
		offTime=5000
	)

```

The script is written in `onActionPerformed` event of the push button. When it is pressed, the value of the DNP3 Slave is not changed and no packets pop up at the WireShark.

Let me know if you require more information about the setup/project and thanks in advance.

Andrei

[DNP3\_test\_manual.pcapng](https://forum.inductiveautomation.com/uploads/short-url/r4YreSOcRxhF7jEOdc6TYPv6aKb.pcapng) (61.1 KB)

---

<div class="post-metadata">

**Author:** ![Marcus\_Sysum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/marcus_sysum/32/57944_2.png) [@Marcus\_Sysum](https://forum.inductiveautomation.com/u/Marcus_Sysum)\
**Post date:** [March 24, 2026, 10:11pm UTC](https://forum.inductiveautomation.com/t/dnp3-fail-to-write-via-script/114651/2 "2026-03-24T22:11:22Z")

</div>

@andrei.veremeenko Can you try this without keyword arguments. This function does not accept keyword arguments.
