How the data are encoding on Anybus Modbus Client Gateway - Endianness

17 Jan 2023

This Knowledgebase article describes how data encoding is perceived at the gateway level and at different network levels themselves.

 

APPLICABLE PRODUCTS

- Anybus X-gateway - Modbus TCP Client AB90XX

 

QUESTION

No matter which option is chosen for data encoding (e.g. Big Endian -> Little Endian), the endianness does not change at the "Transaction Monitor" level. Is there any possibility to exchange them in the software?

 

ANSWER 

The parameter "Data encoding" decides in which order the different bytes of the received/transmitted data should be sent over the network. However, if a different Endian is used on the processor of the other network, the upper and lower bytes can be exchanged, for example. But only the raw data is displayed in the "Transaction Monitor", the byte exchange is only noticeable when writing or reading from the Fieldbus side to the Modbus side. Unfortunately, the data are only reversed in the results. 

 

Example with Anybus X-gateway - Modbus TCP Client - EtherNet/IP Adapter.

Read 1 Modbus register (uint16_t) :
- Modbus: 0x12 0x34
- EtherNet/IP: 0x34 0x12

Read 2 Modbus registers (2 x uint16_t):
- Modbus: 0x12 0x34 | 0x56 0x78
- EtherNet/IP: 0x34 0x12 | 0x78 0x56

Read 2 Modbus registers (uint32_t) :
- Modbus: 0x12 0x34 0x56 0x78
- EtherNet/IP: 0x78 0x56 0x34 0x12

Reading 8 bits Modbus (8 coils) :
- Modbus: 0x12
- EtherNet/IP : 0x12, Data Encoding unchangeable for bit readings

Reading 16 bits Modbus (16 coils) :
- Modbus: 0x34 0x12
- EtherNet/IP : 0x34 0x12, Data Encoding unchangeable for bit readings

 

ADDITIONAL INFO

X-Gateway Solutions