# Problem with delay in sending commands with Modbus on RTU 540

**URL:** <https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100>\
**Category:** General Discussion\
**Created:** [December 20, 2024, 2:27pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100 "2024-12-20T14:27:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![reza\_gh](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@reza\_gh](https://forum.inductiveautomation.com/u/reza_gh)\
**Post date:** [December 20, 2024, 2:27pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/1 "2024-12-20T14:27:32Z")

</div>

Hello. I am using an RTU 540 device to convert the IEC60870-104 protocol to MODBUS. To send a command to the DO of the measuring device, the command sent via IEC 60870-104 is converted to the Modbus protocol and sent to the measuring device with function code 05. But the problem I have is that to send the DO closing command to this device, first another memory location must be activated with function code 05 and then the command is sent. The SCADA system in which I am sending the command does not have the ability to send two commands with a time interval. How can I create this delay in the RTU 540?

---

<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 20, 2024, 2:28pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/2 "2024-12-20T14:28:39Z")

</div>

You could try using scripting (system.opc.writeValue) to write to the areas one after the other.

---

<div class="post-metadata">

**Author:** ![reza\_gh](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@reza\_gh](https://forum.inductiveautomation.com/u/reza_gh)\
**Post date:** [December 20, 2024, 2:29pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/3 "2024-12-20T14:29:33Z")

</div>

Please explain further.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [December 20, 2024, 2:30pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/4 "2024-12-20T14:30:29Z")

</div>

> **[system.opc.writeValue | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-opc/system-opc-writeValue)**
>
> Writes a value directly through an OPC server connection synchronously.

There are examples at the bottom of the page in the manual

---

<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 20, 2024, 2:32pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/5 "2024-12-20T14:32:20Z")

</div>

In a script, something like:

```python
system.opc.writeValue("[device]1.C1", True)

system.opc.writeValue("[device]1.C2", True)

```

obviously with your device unit id, name, addresses, etc... in place.

---

<div class="post-metadata">

**Author:** ![reza\_gh](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@reza\_gh](https://forum.inductiveautomation.com/u/reza_gh)\
**Post date:** [December 20, 2024, 2:35pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/6 "2024-12-20T14:35:57Z")

</div>

I can send the command I want with the modbus poll software. My problem is that I cannot send the command from the SCADA software after converting it to modbus.

---

<div class="post-metadata">

**Author:** ![reza\_gh](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@reza\_gh](https://forum.inductiveautomation.com/u/reza_gh)\
**Post date:** [December 20, 2024, 2:37pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/7 "2024-12-20T14:37:04Z")

</div>

My SCADA software is Farad Sea.

---

<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 20, 2024, 2:38pm UTC](https://forum.inductiveautomation.com/t/problem-with-delay-in-sending-commands-with-modbus-on-rtu-540/100100/8 "2024-12-20T14:38:49Z")

</div>

This is a forum for Ignition SCADA software.
