[ 
https://issues.apache.org/jira/browse/PLC4X-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16879021#comment-16879021
 ] 

Julian Feinauer commented on PLC4X-133:
---------------------------------------

yeah, sounds good to me, +1.

> 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
>            Priority: Minor
>         Attachments: issue_DirectAdsField.png
>
>
> 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)

Reply via email to