Modbus over RS232

J

Thread Starter

Jitender Singh

Hi,

I have a device which has Modbus. I want it to communicate with other device (not having Modbus) but have RS232 port.

Can you provide some information/links on how to communicate with Modbus through RS232.

Thanks,
Jitender Singh
 
J

Jerry Miille

You are confusing the protocol (Modbus) with the physical connection
(RS232).

You can use Modbus protocol on almost any type of physical connection. Examples might be RS232, RS422, RS485, Radio, Dial-up Modem, Fiber Optic and probably many others. A protocol is simply a defined set of rules that allow the meaningful exchange of information from one entity to another. When two or more entities need to exchange information and they do not recognize a common protocol, then what you need is a protocol converter.

The conversion between RS232, RS422, RS485, Radio and Fiber is simply an electrical problem and has nothing to do with the protocol (Modbus) and you can purchase inexpensive converters to change from one physical connection to another from many vendors.

This is not to say that these conversions are problem free because the Modbus protocol imposes some timing constraints on the messages. One of the biggest problems with Modbus RTU protocol is the definition of when a Modbus message starts and ends. The specification says that a message ends when there has been MORE THAN 3.5 character time elapsed since the last character received and the next character received will be the first character of the next message. The specification also states that there must be a single Master (originates messages only), Modbus Slaves may only speak when spoken to and that there can be only a single outstanding message on the communication channel. Unexpected communication delays can cause havoc unless you have a way to "tune" your system. You will need configurable message time-outs and possibly a way to over-ride the 3.5 character end of message gap.

This is usually no problem on a wired connection but if the connection happens to be over a satellite or a modem, then there could be unexpected gaps in a message that some Modbus devices could see as an early "end of message" condition and thus an error. You may need to have a way to "override" this gap. Many protocol converters have configuration options to allow you to do this.

Check with me jmiille at miille.com if you have any additional questions.

Jerry Miille
 
D
I am dealing with a W&S project where customer uses a kind of serial communication RS232 for the Modbus, about 30 nodes on a widespread area, up to 20 km with sometimes 4 hops (links). Character parameter is RTU and receiving server is an Wonderware Modbus server for XP. With the old winNT server it worked rather good, but some nodes hardly sent their values. With new XP server (Archestra) it jammed almost. So we are now trying to switch to ASCÌI, as compared to Comli. The parallel Comli net works decently.

We suspect heavy RTU time gaps in this radio network, causing the traffic to jam, and the new XP Modbus server seems to be even more sensitive for this.
 
Top