# Modbus RTU request with a custom write command

**URL:** <https://forum.inductiveautomation.com/t/modbus-rtu-request-with-a-custom-write-command/115591>\
**Category:** Ignition\
**Tags:** modbus\
**Created:** [May 19, 2026, 7:15am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-request-with-a-custom-write-command/115591 "2026-05-19T07:15:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amurillo](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@amurillo](https://forum.inductiveautomation.com/u/amurillo)\
**Post date:** [May 19, 2026, 7:15am UTC](https://forum.inductiveautomation.com/t/modbus-rtu-request-with-a-custom-write-command/115591/1 "2026-05-19T07:15:00Z")

</div>

Hello, I am working with an inverter that only writes with a personalized command, soo I can't use system.opc.writeValues(). I'm trying to close the modbus device I have in the gateway and open the port with system.serial.openSerialPort(), and then sending the request with system.serial.writeBytes(). This is not working right now and I hope someone could help me, because clearly I'm doing something wrong. I'm working with 8.3 version.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 19, 2026, 12:02pm UTC](https://forum.inductiveautomation.com/t/modbus-rtu-request-with-a-custom-write-command/115591/2 "2026-05-19T12:02:36Z")

</div>

You should try my alternate Modbus driver, which allows the use of scripted custom commands.

> [@Automation Professionals' Advanced Modbus Driver](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312):
>
> Automation Professionals is pleased to announce the first beta for its Advanced Modbus Driver, for Ignition version 7.9. Key features: Server mode, emulating one or more slave [devices](https://www.automation-pros.com/modbus/UserManual.pdf), using any of the three typical connection types, including simultaneous connections of multiple types. Client mode, incorporating all three connection modes in one driver. Support for Modbus Function Codes 20 and 21, File Records. Configure protocol tweaks for troublesome devices per slave unit, enabling suppor…
