You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Martin (JIRA)" <ji...@apache.org> on 2019/07/04 12:24:00 UTC
[jira] [Created] (PLC4X-133) ADS Big-Endian Support
Martin created PLC4X-133:
----------------------------
Summary: ADS Big-Endian Support
Key: PLC4X-133
URL: https://issues.apache.org/jira/browse/PLC4X-133
Project: Apache PLC4X
Issue Type: New Feature
Components: Driver-ADS
Affects Versions: 0.4.0
Environment: Client
- JDK 8
- Windows 10
- TwinCAT3 v3.1.4022.29
PLC
- Beckhoff IPC C6920-0030
- Intel Core 2 Duo mit Windows 7 64Bit
- Twincat XAE 3.1.4022.29 (64Bit Runtime)
Reporter: Martin
For some reason the response of the PLC seems not to be in *LITTLE_ENDIAN* format.
Therefore, the Byte to Integer conversion in [1] results in a negative number.
The issue occurs during the *symbolHandle* creation process in [2].
I had a look at the ADS specification [3] and the response should be in *LITTLE_ENDIAN* format, but for some reason it is not.
As suggested by [~cdutz] we should create an option to override the endianness in the connection-string.
[1] [https://github.com/apache/plc4x/blob/develop/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java#L39]
[2] [https://github.com/apache/plc4x/blob/develop/plc4j/drivers/ads/src/main/java/org/apache/plc4x/java/ads/connection/AdsAbstractPlcConnection.java#L187]
[3] [https://infosys.beckhoff.com/index.php?content=../content/1031/tcplclibutilities/html/TcPlcLibUtilities_AddOn_ByteOrder.htm&id=]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)