Automation Professionals' Advanced Modbus Driver

Well, now at least the device status always remains CONNECTED, but I'm still receiving Bad data :confused:
From what I could see in Wireshark, the queries seem correct.
Could it be a problem processing the responses from the device? I understand that the response also sends 0xF834 in the address pair. Perhaps the driver is expecting responses from ID:300 and that's why it's not processing them.

Anyway, I sent you an email with the Wireshark captures and the wrapper.log file in case that helps.

Regards, Andrés

I'm off by one in computing the CRCs in the responses....

Try this new beta:

For Ignition 8.1: v1.1.13.251051409

1 Like

I think there's still a problem with the CRC.
I'm getting this message in the log, and the data is still bad.

"Received CRC 0x0226 expected 0x43a5 for ReadRegsReq [txid=0, unitId=300, func=3] (sPos=0, crcPos=6, rsp=f834030002002602a1)"

I sent you an email with the Wireshark captures and the wrapper.log file for the new beta.

Regards, Andrés

I figured it out.

The ELAM spec doesn't actually show sample message frames, but it modifies function codes for bulk reads (0x01, 0x02, 0x03, and 0x04) such that the response message reports the byte count as a 16-bit value instead of an 8-bit value. The ELAM spec hints at this but doesn't actually declare it. But since ELAM mode supports reading up to 2500 registers in a single request, the byte count cannot possibly fit in an 8-bit value.

It will take some more code surgery to support this. I'll report back later, probably tomorrow.

3 Likes

Thank you for playing out in real time over the last couple days why I don't support bastardized "Modbus" implementations for hardware that doesn't even exist any more :laughing:

3 Likes

That's great to hear, Phil.
Is there any chance of supporting 2500 register readings in the future? (Maybe not 2500, but at least 500) This would be very useful for reading the controller's dynamometrics cards.
By the way, we have +2400 of these controllers in our oil field :upside_down_face:

Regards, Andrés

1 Like

First there was Modbus, then there was Modbus TCP, now there's Modbus WTF.

Well, nobody donated a real unit for my lab, so working out the details is hard to hide. :man_shrugging:

No, not really. Too many other, more valuable, prospects in my to-do list. FWIW, there's just not much performance to gain with it, unless you are trying to run across a WAN. And that is something I don't want to encourage at all.

3 Likes

I thought they were all based on Modbus WTF!

2 Likes

Ok. New beta altering response handling of function codes 1 through 4 when it comes from an ELAM request.

For Ignition v8.1: v1.1.13.251061415

1 Like

BINGO!!! Is working now!!!
I'm reading just a few HR but looks great.
I'm gonna run some more tests and let you know how they go.

Thanks a lot Phil!

1 Like

Please test reading all four areas, please, if you can. C, DI, IR, and HR.

Can you please share your configuration? I cant get either of the two devices I'm testing working.

Don't forget to create nodes in the device config for each target address. And do not leave any address ranges blank--I haven't fixed that bug yet.

Hi Phil,
HR and IR works fine, I was even able to write a single HR without any problems.
I can't read C or DI.

I sent you a mail with the wrapper.log file and the wireshark capture.

Regards, Andrés

Hi Matthew, this is my configuration:




My Lufking device has ID:300

I hope this helps.

1 Like

Ok, that means Lufkin didn't include function codes 1 and 2 in the 16-bit bytes-to-follow adjustment. Let's just say I'm less than impressed with Lufkin's ability to write a specification. :frowning:

Give me a minute... Done. Next try:

For Ignition v8.1: v1.1.13.251061916

Side note: This cherry-picked neatly into my v8.3 version, and is passing my QA, but I have no ELAM hardware to test the ELAM part..... cough

4 Likes

Success! I was an idiot and was using Modbus TCP :expressionless_face: After re-reading the documentation, changing it to Modbus RTU over TCP and adding that extra :57600N1 it is now pulling data!

Now i just need to get the login to the serial converters to see what the settings are supposed to be!

Thank you :slight_smile:

2 Likes

I have recommendations in the appendix of my user manual.

1 Like

New production release, fixing the empty range node configuration bug found by Matthew in Comment #92 above. It was a real :man_facepalming:

For Ignition v8.1: v1.1.13.251071507

4 Likes