Uploaded image for project: 'Apache PLC4X'
  1. Apache PLC4X
  2. PLC4X-133

ADS Big-Endian Support

Add voteWatch issue
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.4.0
    • None
    • Driver-ADS
    • None
    • 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)

    Description

      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 Christofer Dutz 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=
       

      Attachments

        1. issue_DirectAdsField.png
          58 kB
          Martin Illecker

        Activity

          People

            Unassigned Unassigned
            millecker Martin Illecker

            Dates

              Created:
              Updated:

              Slack

                Issue deployment