CALL NOWCALL NOWCALL NOWGATEWAY SELECTORCALL NOWGATEWAY SELECTORLEARN MORELEARN MORE PROCEED TO CHECK-OUT SUBSCRIBE TO OUR RSS FEED SEARCH GATEWAYS NOW SEND MESSAGE NEWSLETTER | SUBSCRIBESUBMIT CALL NOWCALL NOWCALL NOWGATEWAY SELECTORCALL NOWGATEWAY SELECTORLEARN MORELEARN MORE PROCEED TO CHECK-OUT SUBSCRIBE TO OUR RSS FEED SEARCH GATEWAYS NOW SEND MESSAGE NEWSLETTER | SUBSCRIBESUBMIT

ModbusRTU - Why are 7 data bits bad 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 conceivable that a device which supports less than 128 registers will never have a value larger than 128 stored in any register, so technically, it could use only 7 data bits. But, suppose the message contains a checksum. In that case the use of the 8th bit might be required. This, and many other situations like it, is why 7 data bits is never used for Modbus RTU. In fact you can't 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"


One Response to “Why 7 data bits is no good for Modbus RTU”

  1. prezent says:

    I intended to post you the very small observation to say thanks yet again regarding the spectacular thoughts you’ve shown on this website. This is quite unbelievably generous of you to allow without restraint what a number of us would have offered as an electronic book to make some cash on their own, most importantly given that you might have tried it in the event you decided. These suggestions as well served like the great way to fully grasp some people have similar desire just like my very own to understand somewhat more around this matter. I am certain there are thousands of more fun opportunities up front for those who scan your blog.

Gateway Selector

Select your combination of protocols.
Protocol 1
Protocol 2

Contact Us

Contact us via phone (+1 866-383-1657) or leave a detailed message below for sales, support, or any other needs

*Required Field
I'd like to receive the newsletter. *Check email for confirmation.
*Required Field
Preferred Time To Be Contacted (PST)
8:00am - 12:00pm 12:00pm - 5:00pm