Member Login
Search
Jump to a Date
Sponsored Communities
Cool stuff
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Thermal Overload
The threads that wouldn't die...
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
- PC reliability?
- Windows, real time
- PID loops
- PCs vs. PLCs
- Replacing people
- MS 'monopoly'?
- Software quality
- Where do we go from here?
- Why pay?
Fortune
Maturity is only a short break in adolescence.
-- Jules Feiffer
-- Jules Feiffer
RSS Feed
www.control.com/rss/
To get a personalized feed, become a member at no cost.
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
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
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.
Darrin Hansen
ICC, Inc.
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.
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
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
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/
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- Wireless manager for instrumentation and control devices
- New podcast: One road to wireless instrumentation
- Upgraded communication modules make PLC to PLC communications easier
- Industrial Ethernet advantages using Profinet protocol
- Fieldbus Foundation Seminar: Chicago
- Radios for long-distance use in industrial mesh network
- Embedded: Precise Time Protocol enables new-generation Ethernet mobile networks
- Optimize field wiring with decentralized IP 67 fieldbus system
- Pack Expo: SERCOS real-time communications for packaging
- Modbus RTU master, distributed I/O in compact package: microNCS
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.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!




