Member Login
Search
Past & Future Posts
Sponsored Communities
Neat Stuff

Visit our shop for nerds in control lifestyle products.
Cool stuff
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
Fortune's graffito of the week (or maybe even month):
Don't Write On Walls!
(and underneath)
You want I should type?
Don't Write On Walls!
(and underneath)
You want I should type?
RSS Feed
www.control.com/rss
from the Automation List department...
modbus standardsCould someone please tell me which are the standards (ISO or others, if there are any) you need to follow for working with modbus in general and in particular under linux environment?
Go to http://www.modbus.org The most common is Modbus RTU either over RS-232/422/484 or TCP/IP.
Randy Marek
McDermott Engineering
Randy Marek
McDermott Engineering
Sorry, there are none in the formal "standards" world. Go to http://www.modbus.org and follow the documents there.
Modbus is older than ISO/OSI and although Modbus may be a big fish in our small Automation pond, it's a pretty minor tadpole in the huge IT/Computer ocean of networks and data comms.
- LynnL
Modbus is older than ISO/OSI and although Modbus may be a big fish in our small Automation pond, it's a pretty minor tadpole in the huge IT/Computer ocean of networks and data comms.
- LynnL
See http://www.modbus.org for all Modbus(R) standards questions.
There are supposed to be, but from what I've see you are best guided by what is supported on the other end. I've puttered around with a fairly straightforward expansion of the example provided by Modicon with good results, but many remote racks, etc. can't handle high repetition rates, back to back packets, etc. that PC host to PC host
cause no problems. Still looking for Modbus/TCP IO hardware that can be scanned at high speed. THE standard is the Modbus.org documentation, such that it is.
Regards
cww
cause no problems. Still looking for Modbus/TCP IO hardware that can be scanned at high speed. THE standard is the Modbus.org documentation, such that it is.
Regards
cww
In "theory" Modbus is a half-duplex protocol on TCP, so many slaves
won't expect fast 2nd responses on the same socket. This is a very fuzzy
area as people have done what was "best" (however that's defined), not
what's "requested in spec".
Also, many products work on strict cycles, so if they only handle comms
requests 25 times a second you'll never get more than 25 polls handled
per second even if the IO block CPU is 92% idle (good old fashioned PLC
paradigm)
Try polling over multiple sockets. SOME I/O products MAY handle this
better. So 10 messages per second on 3 sockets instead of trying 30 on 1
socket. This also may help IN SOME PRODUCTS with the fixed comm cycle
times as they'll handle 3 transaction per "comm cycle" instead of the 1
they'd handle with only 1 socket.
But this is all vendor-specific behavior - try and see. I know earlier
Modbus/TCP documents suggested the multiple parallel sockets as a way to
move more data faster. This has been omitted now as it is a worrying
suggestion (ie: if 4 clients all try to open 20 sockets in parallel to a
single small embedded client that only supports 16 sockets total - you
have some "fun" in a bad, unpredictable way.)
- LynnL, www.digi.com
won't expect fast 2nd responses on the same socket. This is a very fuzzy
area as people have done what was "best" (however that's defined), not
what's "requested in spec".
Also, many products work on strict cycles, so if they only handle comms
requests 25 times a second you'll never get more than 25 polls handled
per second even if the IO block CPU is 92% idle (good old fashioned PLC
paradigm)
Try polling over multiple sockets. SOME I/O products MAY handle this
better. So 10 messages per second on 3 sockets instead of trying 30 on 1
socket. This also may help IN SOME PRODUCTS with the fixed comm cycle
times as they'll handle 3 transaction per "comm cycle" instead of the 1
they'd handle with only 1 socket.
But this is all vendor-specific behavior - try and see. I know earlier
Modbus/TCP documents suggested the multiple parallel sockets as a way to
move more data faster. This has been omitted now as it is a worrying
suggestion (ie: if 4 clients all try to open 20 sockets in parallel to a
single small embedded client that only supports 16 sockets total - you
have some "fun" in a bad, unpredictable way.)
- LynnL, www.digi.com
Hi Lynn
Unfortunately, at this stage of the game, the only "universal" solution that avoids tweaking for idiosyncracies is to poll at 10 Hz. Even that might be tolerable if you could fire and forget. However the TAT for some of these is the limiting factor. Of course, in context, many, even highly touted, networked PLC systems can't really do better than that anyway. (And before you guys flame me, put a pulse generator on an input and see how fast a square wave you can _really_ track. It's very educational) One wonders how they found a processor that slow or a stack that bad in today's market.
My solution is to make the rack I'm designing practical either as a PLC or as remote IO. But that's hardly universal as World+Dog will soon be building Ethernet IO and most will support Modbus/TCP. I'm intensly interested in what can be achieved in the real world with a fast processor and stack at each end, for speed, jitter and uncertainties. It could be calculated, but Linux changes every week for the better, making it difficult to predict what will meet the real world. My goal is networked IO that is truly comparable to attached IO. OSS and Open Hardware should achieve that, as even if I'm not smart enough to do it, someone else in the community is.
This whole area is kind of a dirty little secret, when you start actually testing equipment, you'll know why I chuckle when folks damn Ethernet for determinism and the like in comparison with the schemes provided by Big Automation. The real world performance I found was often orders of magnitude less than the theoretical numbers used in advertising. And again, please put facts before flames. I actually tested everything I could get access to. And will continue if someone makes it available.
But, Ethernet capable IO with Modbus/TCP is still a watershed development as it makes many types of non-traditional platforms viable. That's a good thing. If only more stuff were opened up life would be easier. Modbus isn't a be-all end-all, but it's a good start. No doubt standardization will follow.
Regards
cww
Unfortunately, at this stage of the game, the only "universal" solution that avoids tweaking for idiosyncracies is to poll at 10 Hz. Even that might be tolerable if you could fire and forget. However the TAT for some of these is the limiting factor. Of course, in context, many, even highly touted, networked PLC systems can't really do better than that anyway. (And before you guys flame me, put a pulse generator on an input and see how fast a square wave you can _really_ track. It's very educational) One wonders how they found a processor that slow or a stack that bad in today's market.
My solution is to make the rack I'm designing practical either as a PLC or as remote IO. But that's hardly universal as World+Dog will soon be building Ethernet IO and most will support Modbus/TCP. I'm intensly interested in what can be achieved in the real world with a fast processor and stack at each end, for speed, jitter and uncertainties. It could be calculated, but Linux changes every week for the better, making it difficult to predict what will meet the real world. My goal is networked IO that is truly comparable to attached IO. OSS and Open Hardware should achieve that, as even if I'm not smart enough to do it, someone else in the community is.
This whole area is kind of a dirty little secret, when you start actually testing equipment, you'll know why I chuckle when folks damn Ethernet for determinism and the like in comparison with the schemes provided by Big Automation. The real world performance I found was often orders of magnitude less than the theoretical numbers used in advertising. And again, please put facts before flames. I actually tested everything I could get access to. And will continue if someone makes it available.
But, Ethernet capable IO with Modbus/TCP is still a watershed development as it makes many types of non-traditional platforms viable. That's a good thing. If only more stuff were opened up life would be easier. Modbus isn't a be-all end-all, but it's a good start. No doubt standardization will follow.
Regards
cww
For our project http://pvbrowser.org I'm just integrating modbus.
I rely on the following documentation:
http://www.m-system.co.jp/english/service/emmodbus5.pdf
I rely on the following documentation:
http://www.m-system.co.jp/english/service/emmodbus5.pdf
I had a look - such vendor product documents are VERY dangerous to use as a "Modbus Guide" because they freely mix core Modbus and vendor-specific extensions to Modbus. You are FAR better off look at one of the PUBLIC standards on the http://www.modbus-ida.org website
(You'll notice the new web address: http://www.modbus-ida.org, as of Oct 15 Modbus and IDA-Group have merged. http://www.modbus.org will still exist forever, but we are trying to broaden the scope)
- LynnL, www.digi.com
(You'll notice the new web address: http://www.modbus-ida.org, as of Oct 15 Modbus and IDA-Group have merged. http://www.modbus.org will still exist forever, but we are trying to broaden the scope)
- LynnL, www.digi.com
From Control Engineering magazine...
Related articles from Control Engineering magazine- OPC: Painless migration, classic OPC DA to OPC UA, partership
- Easier: panel designs, short-circuit current rating compliance
- MechatronicsZone road show kicks off
- Partnership: Advanced, interoperable motion control, machine tools
- Protect intellectual property: Encrypt firmware, control code
- Portable computing: Operators can be mobile with rugged HMI
- Whitepaper: Small form factor HMIs evolve
- Remote control: Get behind firewalls—securely
- Report asks: Will DIN-rail PCs with I/O revolutionize industrial PCs?
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, PostgreSQL and Apache. Be happy.
Our Advertisers
Help keep our servers running...
Patronize our advertisers!
Patronize our advertisers!



