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