Automation Professionals' Advanced Modbus Driver

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.

Something strange is that the device's STATUS alternates between Connected and Disconnected every 15 seconds.
imagen
imagen

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 (1.9 KB)
MbusELAMoverTCP-KEP.pcapng (2.0 KB)
MbusRTUoverTCP-IGNITION.pcapng (1.6 KB)
MbusRTUoverTCP-KEP.pcapng (1.6 KB)

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.

Hi Phil,
Here's a captureof using your ModbusRTU-over-TCP driver from the beginning.
MbusELAMoverTCP-IGNITION_beginning.pcapng (1.6 KB)

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

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

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

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?

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.

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

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

MbusELAM-overTCP_KEP-beginning.pcapng (2.6 KB)

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.

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

Regards, Andres

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?)

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

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

For Ignition v8.1+: v1.1.13.251041747

3 Likes

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

1 Like

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.

Regadrs Andres

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. }

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

OK. Another bug fix for the beta.

For Ignition v8.1: v1.1.13.251051227

1 Like