Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plc4j/ab-eth): Enable AB-Ethernet Driver reading #2040

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

andvasp
Copy link
Contributor

@andvasp andvasp commented Mar 15, 2025

Hi everybody!

In this PR I am enabling the AB-Ethernet Driver reading. Also implemented the missing multiple tags reading.

About the transaction counter reinitialization, should not be set to 10 like the declaration?

@chrisdutz, Do you remeber why 10? Using one Opc Server it starts with 32. But 10 is working perfectly!

transaction counter reinitialize

  private final AtomicInteger transactionCounterGenerator = new AtomicInteger(10);
...
  if (transactionCounterGenerator.get() == 0xFFFF) {
      transactionCounterGenerator.set(1);
  }

Add the possibility of multiple readings.
@chrisdutz
Copy link
Contributor

Hehe... That's a relic from the old times in s7... There were several messages exchanged in order to establish the connection, so we simply had the counter start at 10...i guess there's absolutely no reason for this in ab-eth.

@ottlukas ottlukas added java Pull requests that update Java code Ethernet/IP https://plc4x.apache.org/users/protocols/eip.html labels Mar 17, 2025
@andvasp
Copy link
Contributor Author

andvasp commented Mar 18, 2025

hehe...

What about the transaction counter reinitialization, the reinitialized value should not be the initial value on the variable declaration?

I tested using value 1 on the initialization and it works too. I checked the specification and it does not mention any constraint of the first value.

@chrisdutz
Copy link
Contributor

Feel free to change whatever you need.

@chrisdutz chrisdutz closed this Mar 18, 2025
@chrisdutz chrisdutz reopened this Mar 18, 2025
@chrisdutz
Copy link
Contributor

Ups ... sorry ... the one button is directly next to the other one :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ethernet/IP https://plc4x.apache.org/users/protocols/eip.html java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants