Subscribe to receive Slightly Sensible blog posts by email:

Your email:

Get a catalog!

Slightly Sensible - B&B Insider

Current Articles | RSS Feed RSS Feed

Merry Modbus

Submit to Digg digg it | Submit to Reddit reddit | Add to delicious delicious | Submit to StumbleUpon StumbleUpon 

You know about my affinity for good ol' serial communications. Watching those familiar bits and bytes flow by gives me the same warm fuzzy feeling as sitting around a fireplace with stockings hung with care.

Elegantly simple and effective for so many applications.

But what story are those bits and bytes trying to tell, and how do they get the job done? More often than not, the protocol of choice is Modbus. Just like good ol' RS232 and RS485, Modbus is elegantly simple and singularly responsible for an amazing amount of automation around the world.

But, like the serial wires that carry its message, Modbus isn't always plug and play. Frustrating, real-world problems sometimes make Modbus a victim of its own simplicity.

Let's do a super-quick review of the three flavors of Modbus.

First off, there is Modbus ASCII. Communicating over 232 or 485, ASCII is ultra simple, human readable, 7 data bits, but not horribly efficient.

Then  Modbus RTU. Also over 232 or 485, with 8 data bits and better error checking, RTU is much more bus-efficient than ASCII, but also more sensitive to timing.

And now we've got Modbus/TCP, which nicely wraps Modbus packets for use over Ethernet, delivering all the speed and networking benefits of TCP/IP.

Regardless of which Modbus flavor you choose, all Modbus messages are a master-slave configuration where the master (often a programmable logic controller, or PC running supervisory software), must poll each node to determine its status.

So dear reader, I'm pondering - would you like to hear more about Modbus? How it works? Solutions to problems like:

Or are your problems trickier yet? Things like:

  • Connecting a Modbus ASCII device to Modbus RTU?
  • Connecting two Modbus devices that are hardwired to different baud rates?
  • Hanging Modbus serial devices on a Modbus/TCP network?
  • Magically remapping hardcoded Modbus ID's to non-conflicting addresses?

If you're interested I'll share those solutions with you next month (or faster - just drop me an email). Don't hesitate to challenge me with other real-world Modbus problems that you've run into. I want to hear about them. I stand at the ready to take on your Modbus woes.

So between Christmas shopping and competing with the Smiths for the best Christmas display control algorithm on your block, drop me a note to let me know when Modbus has left you feeling Grinch-like and I'll do what I can to ease your protocol afflictions in the new year.

Tags: 

Comments

How to convert modbus ASCII to modbus RTU and viceversa. 
 
 
 
Eg. If I have to communicate PLC (which have Modbus RTU support) and AC drive (which have modbus ASCII support) how can we do it??
Posted @ Friday, June 05, 2009 7:29 AM by Apurva
Easily done with the MESR902T <a>http://bb-elec.com/product_multi_family.asp?MultiFamilyId=86<a> 
 
Simply configure port one as RTU and port two as ASCII, then configure the routing for port one and two to connect to each other. Each port independently supports 232/422/485 so you can do physical layer conversions if needed as well. 
 
 
 
In your case, you'll use the Ethernet port only during configuration. Once configured, you'll just use the two serial ports.  
 
 
 
-Mike 
 
 
 
Posted @ Monday, June 08, 2009 9:32 AM by Mike Fahrion
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Receive email when someone replies.