# Automation Professionals' Advanced Modbus Driver

**URL:** <https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312>\
**Category:** 3rd Party Modules\
**Created:** [December 8, 2020, 8:45pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312 "2020-12-08T20:45:46Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 11, 2025, 6:25pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/101 "2025-04-11T18:25:30Z")

</div>

Hi Phil,  
I'm testing communication with a Lufking SAM RPC controller. It can communicates via Modbus RTU if configured with IDs between 2 and 247, and talks ELAM with IDs greater than 248.

In Modbus RTU mode (using ID=2), the driver works fine. I should clarify that I'm actually using Modbus RTU over TCP through a Redline RDL3000 radio that acts as a serial converter.

However, I can't communicate using Modbus ELAM. I've configured the SAM with ID=300 and the driver to use #Unit 300, but I haven't been able to achieve it.

 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/1/515f82cf69314765efdff16c40db2a7eec4a81b3.png)

Something strange is that the device's STATUS alternates between Connected and Disconnected every 15 seconds.  
 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/a/1a437443a87f806b1656de23ce8bfa1010095b51.png)  
 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5df2d63f1052b2e48e72b766512c8cade4d2aac6.png)

I tried doing the same with Kepserver, and it works perfectly reading the holding register 41430. I'm attaching Wireshark screenshots for both ModbusRTU-overTCP and ModbusELAM-overTCP from both Ignition and Kepserver. I hope you can help me.

Regards, Andrés  
[MbusELAMoverTCP-IGNITION.pcapng](https://forum.inductiveautomation.com/uploads/short-url/nkFwQSxlpxRaC8wZjwiaXl6zAnD.pcapng) (1.9 KB)  
[MbusELAMoverTCP-KEP.pcapng](https://forum.inductiveautomation.com/uploads/short-url/ouR73NvAMppJBwc4Y22oX3pwBkj.pcapng) (2.0 KB)  
[MbusRTUoverTCP-IGNITION.pcapng](https://forum.inductiveautomation.com/uploads/short-url/qnQUw5uvJXcynBVQZuWc7R1cI2N.pcapng) (1.6 KB)  
[MbusRTUoverTCP-KEP.pcapng](https://forum.inductiveautomation.com/uploads/short-url/cE2F1x2RJ388M18nidewWnJfVoq.pcapng) (1.6 KB)

---

<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:** [April 11, 2025, 6:48pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/102 "2025-04-11T18:48:20Z")

</div>

The first capture shows no data traffic at all. (Len=0 on all packets.) I'll need to see packets from the beginning of that connection. (Enable a device after wireshark is running.)

The second capture shows ELAM RTU over TCP from kepware, not modbus TCP. (Wireshark doesn't understand this, but I manually decoded.)

The third and fourth captures both show working Modbus RTU traffic to non-ELAM unit #2, register offset 1429 (legacy address 401430).

Please use Modbus RTU over TCP with my driver, and run the capture from before enabling the device.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 11, 2025, 7:01pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/103 "2025-04-11T19:01:12Z")

</div>

Hi Phil,  
Here's a captureof using your ModbusRTU-over-TCP driver from the beginning.  
[MbusELAMoverTCP-IGNITION\_beginning.pcapng](https://forum.inductiveautomation.com/uploads/short-url/uAavfqtAYprDtcjjA4aauAHi6i3.pcapng) (1.6 KB)

---

<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:** [April 11, 2025, 8:05pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/104 "2025-04-11T20:05:48Z")

</div>

The target device killed (FIN) each attempt to connect. No other traffic occurred. Something else is wrong.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 11, 2025, 8:14pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/105 "2025-04-11T20:14:53Z")

</div>

Ok, but why with Kepserver is working fine with the same device?

---

<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:** [April 11, 2025, 8:19pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/106 "2025-04-11T20:19:49Z")

</div>

No idea. But that device told Ignition to sod off.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 11, 2025, 8:25pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/107 "2025-04-11T20:25:44Z")

</div>

In the previous message I attached a Kepserver capture using ELAM-over-TCP. Maybe by comparing both captures (Kep vs Ignition) we'll find something, right?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [April 11, 2025, 8:29pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/108 "2025-04-11T20:29:38Z")

</div>

I'm sure he's probably already done that. Is the Kepserver capture from start also (starting with data collection disabled, then enabling data collection?). There could be some handshake if you started the capture after it was already communicating that isn't visible in your capture.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 11, 2025, 8:32pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/109 "2025-04-11T20:32:39Z")

</div>

Of course, you're right. I'll do it and share the capture.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 14, 2025, 12:12pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/110 "2025-04-14T12:12:19Z")

</div>

Hi Phil,  
Here is a capture of KepServer from de beginning using ELAM-over-TCP and ID:300

[MbusELAM-overTCP\_KEP-beginning.pcapng](https://forum.inductiveautomation.com/uploads/short-url/aLfUdeJZvNHsL2UrsDeCwJ8bWmL.pcapng) (2.6 KB)

---

<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:** [April 14, 2025, 1:53pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/111 "2025-04-14T13:53:54Z")

</div>

I can see what is happening, but I am not sure why. The Kepware and Ignition traffic are identical through the SYN--SYN/ACK--ACK normal handshake. Kepware then proceeds to make ELAM queries (which wireshark cannot decode) and receives proper responses.

Ignition (my driver) does nothing, and the FIN that kills it is ten seconds later--a typical device behavior when not receiving any traffic.

So. Presuming the same register is subscribed in both cases, there must be an exception occurring in my code that is preventing the subscription from producing queries.

Please set DEBUG level on all of the `com.automation_pros.modbus....[DeviceName]` loggers and repeat the series. (Just enable the device for a minute or so to collect logs.) Please send the pruned logs (preferably from the actual wrapper.log file, not the SQLite file) to my support email.

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 14, 2025, 5:15pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/112 "2025-04-14T17:15:02Z")

</div>

Hi Phil,  
I sent you an email with the pruned wrapper.log to your email address [support@automation-pros.com](mailto:support@automation-pros.com).  
Please confirm that you received it.

Regards, Andres

---

<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:** [April 14, 2025, 5:33pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/113 "2025-04-14T17:33:58Z")

</div>

Please don't expose my direct email address on this forum. Send to my support address in the future. (Could an admin hide the prior version, please?)

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 14, 2025, 5:49pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/114 "2025-04-14T17:49:02Z")

</div>

Sorry about that, Phil. I didn't know you had a separate email for support. My bad.

Shall I forward the email to the support account? Or have you already received the wrapper.log file?

Regards, Andrés

---

<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:** [April 14, 2025, 5:52pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/115 "2025-04-14T17:52:16Z")

</div>

I've got it. And it highlighted a bug. New beta coming shortly... Done. Try this:

For Ignition v8.1+: ~~v1.1.13.251041747~~

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 14, 2025, 6:53pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/116 "2025-04-14T18:53:56Z")

</div>

It's still not working, but I can see in Wireshark that the queries are being issued.  
I just sent an email to your support account with the wreapper.log file and the Wireshark capture.

Regards, Andrés

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 15, 2025, 11:57am UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/117 "2025-04-15T11:57:50Z")

</div>

Hi Phill,  
I was looking the queries from Ignition and I think the ID is wrong.  
In ELAM when the ID is greater than 247, it should use 2 bytes (that's OK), but the first 5 bits should be 1, and the remaining 11 bits are the ID minus 248. I think that's what's missing.  
The two bytes for ID 300 should be F834 or 1111-1000-0011-0100.

 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/0795f3358cd828031a6c0adaf85eefbbf802ad46.png)  
 ![imagen](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/1/f1482cac78ef13a2de761dcdedbd428bdddde2a6.jpeg)

Regadrs Andres

---

<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:** [April 15, 2025, 12:11pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/118 "2025-04-15T12:11:50Z")

</div>

I haven't had a chance to look at your last capture, but your math isn't right. 300 -248 =\> 52, which is 0x34, for 0xf834 as the address pair. Look at the kepware to see that.

{ Just opened the file--definitely not encoding the unit correctly. Offset is missing. }

---

<div class="post-metadata">

**Author:** ![Andres\_Rossi](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@Andres\_Rossi](https://forum.inductiveautomation.com/u/Andres_Rossi)\
**Post date:** [April 15, 2025, 12:29pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/119 "2025-04-15T12:29:58Z")

</div>

You're tottaly right, my mistake. The address pair should be 0xf834.  
I've already corrected it.

---

<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:** [April 15, 2025, 12:36pm UTC](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312/120 "2025-04-15T12:36:49Z")

</div>

OK. Another bug fix for the beta.

For Ignition v8.1: ~~v1.1.13.251051227~~

[Previous page](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312.md?page=5)

[Next page](https://forum.inductiveautomation.com/t/automation-professionals-advanced-modbus-driver/41312.md?page=7)
