Skip to content

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

Merged
chrisdutz merged 2 commits into
apache:developfrom
andvasp:ft/ab-eth-read
Mar 31, 2025
Merged

feat(plc4j/ab-eth): Enable AB-Ethernet Driver reading#2040
chrisdutz merged 2 commits into
apache:developfrom
andvasp:ft/ab-eth-read

Conversation

@andvasp

@andvasp andvasp commented Mar 15, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

andvasp commented Mar 18, 2025

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Contributor

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

…the reinitialization (1) . This way we can avoid a future problem that could happen in the reinitialization.
@andvasp

andvasp commented Mar 22, 2025

Copy link
Copy Markdown
Contributor Author

Hi @chrisdutz,

I changed the transaction counter initialization value.

Although it looks like a lot of modification, if you ignore whitespaces you are going to note that is not because I could remove a for statement.

Thanks,
Anderson.

@andvasp

andvasp commented Mar 31, 2025

Copy link
Copy Markdown
Contributor Author

Hi @chrisdutz,

I've seen that you are preparing for the next release. That is great!

Any chance to accept this PR to be included in the new release?

Thanks.
Anderson.

@chrisdutz chrisdutz merged commit bc10315 into apache:develop Mar 31, 2025
@chrisdutz

Copy link
Copy Markdown
Contributor

I however guess the release will probably still take a while (if I am to do it, as our new crowd-funding system is currently not really over-flowing with budget and I have stopped doing the housekeeping free of charge: https://opencollective.com/friends-of-toddy/projects/create-release-0130)

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