Why 7 data bits is no good for Modbus RTU

Modbus RTU is a binary protocol. It requires the use of all 8 bits in each character / byte that forms the message because there are many situations where the 8th bit is used. For example, an exception response has the 8th (most significant bit set. If you wanted to read holding register 40130 then the message contains the offset. In this case the offset is 129 (The distance from 40001). The number 129 requires 8 bits of storage. In fact all numbers greater than 127 require the 8th bit.  These are just two example of why 8 data bits are required to send RTU messages. It is concievable that a device could which supports less than 128 registers which will never have a value larger than 128 stored in any register could use 7 data bits but the message contains a checksum which might require the use of the 8th bit and this is why 7 data bits is never used for Modbus RTU. In fact you cant use 7 data bits for any binary protocol.

Example: Read 40130 length 31 from device 11.

[01]               [03]              [00]             [81]               [00]             [1f]               [54]               [2a] (Hex Values)

[0000 0001] [0000 0011] [0000 0000] [1000 0001] [0000 0000] [0001 1111] [0101 1000] [0010 1010]

Modbus Ascii (JBUS) is an ASCII protocol. Every character in the message is encoded in ASCII characters and ANSI ASCII character set only require 7 data bits to be encoded since the max value of an ASCII characters is 127. These days the set has been extended and contains non-human readable characters numbered from 128-255.

The same message sent in Jbus sends this string of human readable characters.

“01030081001f542a”

Keywords for this article: 8 Data_Bits