Skip to content

plc4j(ab-eth): Fix read tag after refactoring/spi3#2606

Merged
chrisdutz merged 1 commit into
apache:developfrom
andvasp:fix/plc4j(ab-eth)-after-spi3
Jun 18, 2026
Merged

plc4j(ab-eth): Fix read tag after refactoring/spi3#2606
chrisdutz merged 1 commit into
apache:developfrom
andvasp:fix/plc4j(ab-eth)-after-spi3

Conversation

@andvasp

@andvasp andvasp commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Hi @chrisdutz!

When trying to read tag values, the system is getting a timeout error. The problem occurs because the calculateTotalMessageSize is getting a big value. As a result, the driver keeps waiting for incoming data that will never arrive, since the actual data transfer has already finished.

Note: I considered whether this behavior should be configured. However, since the rest of the reading mechanism works fine without extra configuration, a direct fix in the size calculation seems to be the correct approach.

Before refactoring/spi3 it is working properly. I tried to find similar logic in the old version but It looks like it does not exist. So I believe the old mecanism approach considers that the received data will arrive in just one shot, right?

Thanks,
Anderson.

@chrisdutz

Copy link
Copy Markdown
Contributor

Looking at your change it looks as if this is a Little-Endian vs. Big-Endian thing ... However looking a bit deeper into this, it seems the EIP is generally LE ... I wonder why things worked in my case. I'll look into this.

@chrisdutz

Copy link
Copy Markdown
Contributor

Just noticed that it's not the EIP driver, but the AB-ETH ... sorry for the mis-understanding ... so you state that all is working with this fix? Then I'll simply merge it as I have no other way to validate it and the code changes look sound.

@andvasp

andvasp commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

Yes. It is working fine. If you check in the ab-eth.mspec you will notice that it specify big-endian.

I was responsible for enabling reading of this driver through #2040, Probably I am the only one using it! :)

Thanks!

@chrisdutz

Copy link
Copy Markdown
Contributor

Yeah ... might be ... would really be cool, if we knwo who's using what ...

Aaah ... I had it little endian and you made it big endian to match ... perfect .. thanks for spotting this and fixing it ;-)

@chrisdutz chrisdutz merged commit 525554e into apache:develop Jun 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants