# Modbus Server Driver

**URL:** <https://forum.inductiveautomation.com/t/modbus-server-driver/95481>\
**Category:** 3rd Party Modules\
**Created:** [September 3, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481 "2024-09-03T13:46:18Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [September 3, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/1 "2024-09-03T13:46:18Z")

</div>

I finally got around to doing version 2.0 of the [Modbus library](https://github.com/digitalpetri/modbus) I maintain, and in the course of developing a more usable server API than the 1.0 version had I figured it would be useful to "dogfood" the API.

So here's a Modbus Server driver for Ignition: [https://github.com/kevinherron/modbus-server-driver](https://github.com/kevinherron/modbus-server-driver)

There's a signed module available in the releases section: [https://github.com/kevinherron/modbus-server-driver/releases/tag/v1.0.0-RC1](https://github.com/kevinherron/modbus-server-driver/releases/tag/v1.0.0-RC1)

This isn't an official IA module. Aside from some unit and integration tests I've done some cursory poking at it, but nothing like the QA it would receive as an official module, so caveat emptor. It may have more value simply serving as a more complete example of how to use the Device API.

---

<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:** [September 3, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/2 "2024-09-03T13:46:39Z")

</div>

Pinned on September 3, 2024, 1:46pm UTC



---

<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:** [September 3, 2024, 2:30pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/3 "2024-09-03T14:30:29Z")

</div>

> [@Kevin.Herron](#):
>
> more complete example of how to use the Device API.

I like this.

How well will this map to v8.3?

I appreciate that you dropped one-based addressing... 😁

---

<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:** [September 3, 2024, 2:39pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/4 "2024-09-03T14:39:16Z")

</div>

It will require some changes to be 8.3 compatible, I'll make an 8.3 branch that demonstrates the necessary changes and how to do config migration (whenever we are "public" or "beta").

If your drivers still use the `Driver` interface, however, this is not at all representative of the amount of work you have ahead of you. The `Driver` interface is no longer public in 8.3, and the extension points supporting them have been removed. All drivers must use the `Device` interface.

---

<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:** [September 3, 2024, 2:42pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/5 "2024-09-03T14:42:11Z")

</div>

> [@Kevin.Herron](#):
>
> All drivers must use the `Device` interface.

Yes, I'm aware. I've blocked out Q4 for v8.3 module updates. I intend to go directly from v8.1 Driver to v8.3 Device.

---

<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:** [September 3, 2024, 2:44pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/6 "2024-09-03T14:44:01Z")

</div>

I don't think it's actually all that hard. Just different method signatures and implementations of what are otherwise the same core concepts: browse, read, write, subscribe

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [September 3, 2024, 3:40pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/7 "2024-09-03T15:40:03Z")

</div>

Neat, nice tests 😉

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 3, 2024, 6:49pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/8 "2024-09-03T18:49:30Z")

</div>

Amazing !  
I think I have a usecase, perhaps out of scope  
We have an existing application from another scada that we convert to Ignition.

This application is connected to some modbus PLC, and those PLC accept only one TCP connection.

We would like to connect Ignition to the PLC on the same time to be able the check both HMI have the right data.

Perhaps we could connect Ignition to the PLC with the Modbus client driver  
and connect the other SCADA to Ignition Modbus server.  
Do you have planned to "connect" this module with ignition modbus client driver to be able to share the data ?

Other SCADA ( **master** )  
|  
Modbus TCP  
|  
Ignition ( **master and slave** )  
|  
Modbus TCP  
|  
PLC ( **slave** )

---

<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:** [September 3, 2024, 6:55pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/9 "2024-09-03T18:55:32Z")

</div>

You could accomplish that now with some tag change scripts, not sure what it would look like to try and do it automatically.

If you don't mind a little programming a better solution might be to use the Modbus library I linked and build your own "Modbus TCP to TCP Gateway"... it would be pretty trivial I think. On one side you maintain a single client connection to the PLC, on the other you receive as many Modbus TCP connections as you want, and you just proxy/pass the requests on down to the slave. Could be wrapped up and deployed via docker in no time.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [September 3, 2024, 7:36pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/10 "2024-09-03T19:36:28Z")

</div>

Ok I see, that will be the best solution. The only drawback is it will double the numbers of request to the PLC.

---

<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:** [September 3, 2024, 7:38pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/11 "2024-09-03T19:38:15Z")

</div>

The most straightforward implementation would, yes.

You can get as creative as you like, though. If you know ahead of time all the registers that both SCADA systems will read then your gateway could read them at whatever pace you define, update a cache, and then server the incoming client requests out of that cache. Lots of options.

Or can you just weave it all together with the server driver 🤷‍♂️

---

<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:** [September 3, 2024, 9:11pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/12 "2024-09-03T21:11:14Z")

</div>

A complete implementation of your use case with my alternate driver is shown over here:

> [@Modbus Slave/Server to Generate Read Only Tags](https://forum.inductiveautomation.com/t/modbus-slave-server-to-generate-read-only-tags/87583/21):
>
> I've create a generic "Modbus Publish" script that eliminates the need for a second set of tags. I've publicly posted it here: [https://www.automation-pros.com/ignition/modbusPublish.py](https://www.automation-pros.com/ignition/modbusPublish.py) It requires the "Queue Utility" script posted here: [https://www.automation-pros.com/ignition/queueUtil.py](https://www.automation-pros.com/ignition/queueUtil.py) and described over here: Both scripts rely on my Integration Toolkit's globalVarMap() script function, but you can rework that (not quite 1:1) to use system.util.getGlobals() if you must. (Not recomme…

Does not require double tags. Optionally takes advantage of the common address patterns between the IA driver and my server driver to minimize the configuration required.

One of its users has precisely the same motivation as you: expose a device that accepts only one connection to multiple consumers.

---

<div class="post-metadata">

**Author:** ![msteele](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/msteele/32/77889_2.png) [@msteele](https://forum.inductiveautomation.com/u/msteele)\
**Post date:** [September 3, 2024, 10:33pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/13 "2024-09-03T22:33:30Z")

</div>

Any kepware salesfolk saddened by this thread, I'll buy you a beer at ICC to cheer you up.

---

<div class="post-metadata">

**Author:** ![Anthony\_Ho1](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@Anthony\_Ho1](https://forum.inductiveautomation.com/u/Anthony_Ho1)\
**Post date:** [September 10, 2024, 9:50pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/14 "2024-09-10T21:50:40Z")

</div>

This is huge. As Phil said, there are a lot of devices that only accept one connection, if I want to do some investigation or diagnosis, I have to stop the Modbus driver before I can run program like mod scan. I lost production data in the meantime.  
Also thanks for the byte order option!

---

<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:** [August 1, 2025, 10:27pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/15 "2025-08-01T22:27:42Z")

</div>

Updated for Ignition 8.3 beta: [Release v2.0.0-RC1 · kevinherron/modbus-server-driver · GitHub](https://github.com/kevinherron/modbus-server-driver/releases/tag/v2.0.0-RC1)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [August 11, 2025, 5:05am UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/16 "2025-08-11T05:05:27Z")

</div>

Hi Kevin,

Isn’t it free module?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/55f003e8045ba24e8d6324e40cc2b0ab40da3235.png)

Is it possible to register this module for Edge version? We have a lot of use cases for this at Edge Device.

---

<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:** [August 11, 2025, 12:38pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/17 "2025-08-11T12:38:23Z")

</div>

It is free,

But Edge doesn’t allow third party modules, including myself in this case.

I think sometimes you can get an exception from sales… you’d have to plead your case with them.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [August 11, 2025, 1:05pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/18 "2025-08-11T13:05:44Z")

</div>

But why it is trial mode in standard ignition edition as shown in image above ?

---

<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:** [August 11, 2025, 1:07pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/19 "2025-08-11T13:07:15Z")

</div>

Looks like I forgot to override `isFreeModule` in the module hook. I’ll have to fix that. There is no trial timeout or licensing logic though.

---

<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:** [August 11, 2025, 1:19pm UTC](https://forum.inductiveautomation.com/t/modbus-server-driver/95481/20 "2025-08-11T13:19:24Z")

</div>

Ok, fixed it and kicked off some workflows to build the modules…

Can you see and download the artifacts on these?

8.1: [Build and Sign Ignition Module · kevinherron/modbus-server-driver@eb44a03 · GitHub](https://github.com/kevinherron/modbus-server-driver/actions/runs/16881175375)

8.3: [Build and Sign Ignition Module · kevinherron/modbus-server-driver@b4b00bd · GitHub](https://github.com/kevinherron/modbus-server-driver/actions/runs/16881173223)

[Next page](https://forum.inductiveautomation.com/t/modbus-server-driver/95481.md?page=2)
