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

[Bug]: ADS, reading array returns only 1st element #1754

Closed
2 of 16 tasks
fdupont-epsilia opened this issue Sep 9, 2024 · 4 comments
Closed
2 of 16 tasks

[Bug]: ADS, reading array returns only 1st element #1754

fdupont-epsilia opened this issue Sep 9, 2024 · 4 comments

Comments

@fdupont-epsilia
Copy link
Contributor

What happened?

PlcReadResponse getAllBytes/getAllIntegers with PLC4J to a Beckhoff TwinCat program :

arrayVariable AT %I* : ARRAY [1..13] OF WORD;

Returns only the 1st element.

Array has :
[11, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13]

[11] is returned.

New issue since commit : bdd05c9 [bdd05c9]
Date: September 8, 2024 13:14:19

Version

0.13.0-SNAPSHOT

Programming Languages

  • plc4j
  • plc4go
  • plc4c
  • plc4net

Protocols

  • AB-Ethernet
  • ADS /AMS
  • BACnet/IP
  • CANopen
  • DeltaV
  • DF1
  • EtherNet/IP
  • Firmata
  • KNXnet/IP
  • Modbus
  • OPC-UA
  • S7
@chrisdutz
Copy link
Contributor

The code changed in that commit only affected the browse functionality ... not sure how this should have affected the read-functionaility.

@chrisdutz
Copy link
Contributor

Oh ... having a deeper look at it ... it does seem as if the changes to getPlcValueTypeForAdsDataType really do have an effect on the reading of arrays ... but I'm currently cleaning up the array handling as currently it wouldn't be possible to address an array element where the array part it not at the end. So consider me working on it.

But thinking about it ... I guess I could do a quick-fix for it.

@chrisdutz
Copy link
Contributor

I whish Github would not automatically close things immediately when you commit a potential fix.

@fdupont-epsilia
Copy link
Contributor Author

With the last commit, reading array works again. Thanks.

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

No branches or pull requests

2 participants