Member Login
member
passwd
remember me on
this computer.

- join now -
- forgot username or password? -

Search

Jump to a Date

Sponsored Communities
Cool stuff
Select a topic of interest:
...and press:
Neat Stuff
Control.com Stuff

Visit our shop for nerds in control lifestyle products.

Fortune
Maturity is only a short break in adolescence.
-- Jules Feiffer
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss/
To get a personalized feed, become a member at no cost.
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
advertisement
from the Automation List department...
RTU modbus mode
Communications systems and equipment. topic
Posted by TAT on 1 July, 2008 - 1:33 am
Hi,

In RTU mode in the Modbus message, for each byte there are 11 bits:
1 bit - start
8 bits - data
1 bit for parity
1 bit for stop bit

If parity is none, then stop bit will be 2.

However, in most applications I see that in RTU mode, although parity is set to be NONE, stop bit is still set to be ONE. Why is that? Is stop bit supposed to be TWO because parity is NONE?

Thanks,
T


Posted by Darrin Hansen on 2 July, 2008 - 12:18 am
According to the spec, yes you are correct: there "should" always be 11 bits per character. However, the market dictates its own requirements sometimes, and this is one of those times. Because many people have come to expect this "unspecified" behavior, it is best for products to support both one stop and two stop bit selections with no parity.

Darrin Hansen
ICC, Inc.


Posted by Dan Newman on 3 July, 2008 - 12:39 am
The short answer is no. Having parity set to none does not require the system to then be set to two stop bits. As to why, I don't have time to write an essay on how the UART works, just know that the system will reduce the number of bits by one when you set parity to none. If the PLC has over run errors, then set the stop bits to two.


Posted by Darrin Hansen on 4 July, 2008 - 1:42 am
Actually, 2.5.1 of the current "modbus over serial line spec" states "...Remark : the use of no parity requires 2 stop bits..."

If a product was designed according to the "old" PI-MBUS-300 Rev J spec, page 6 of that document states "...1 stop bit if parity is used; 2 bits if no parity..."

But again, in practice customers don't really care about what the spec says in this regard: if they want to use no parity/1 stop bit (for whatever reason), they expect products to support that.

Darrin


Posted by Jerry Miille on 5 July, 2008 - 11:05 am
The official specification says just what you define. However, common practice dictates that you should have the "choice" to make your communication settings 10 bits by setting the parity to none and the stop bits to one for Modbus RTU.

There is really no reason for a parity bit when using Modbus RTU anyway because the protocol includes a very robust, 16-bit CRC error detection algorithm. Just save the bit time and move on.

Of course, if you are strictly adhering to the 3.5 character time out value, then it makes this computation a little more difficult, but even then, many devices don't really pay that much attention to the exact time out value.

Jerry Miille
Miille Applied Research Co., Inc.
http://www.miille.com/

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.

Internet Explorer 6.0 Fix

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!