Data Encoding; Binary; 16-Bits Word(Int16) - ICP DAS USA ALM-04-MRTU User Manual

Table of Contents

Advertisement

4.3 Data Encoding

Modbus uses a "big-endian" representation for address and data items. This means
that when a numerical quantity larger than single byte is transmitted, the most
significant byte (MSB, also called the high-order byte) is send first. The following sub-
topics describe the different byte of encoding and show how the data is encoded as it is
within the Modbus RTU packet.

Binary

4.3.1
A binary item is represented as a single bit within a data word. All binary is packed
into 16-bits data words, which are accessed using function code 01 and 02. Therefore, a
single register contains 16 bits of binary data, each having a specific meaning.
(1010101001010101)
Table 4-3: A single register contains 16 bits of binary data

16-bits Word(INT16)

4.3.2
A 16-bits word item is transmitted with the most significant byte first. Function
code 03 and 04 read 16-bits items at a time; therefore, each of these data items will fit
within one register that is read.
ALM-04-MRTU
ALM-04-MRTU User's Manual
Value
0xAA55
Value
0x1234
Table 4-4: A 16-bits word item
User's Manual (Rev1.0, Jan./2020) ------------- 24
1st
0xAA
(10101010)
1st
0x12
2nd
0x55
(01010101)
2nd
0x34

Advertisement

Table of Contents
loading

Table of Contents