electrical-engineering-portal.com-Using_MODBUS_for_Process_Control_and_Automation_1
electrical-engineering-portal.com-Using_MODBUS_for_Process_Control_and_Automation_1
co m
http://electrical-engineering-po rtal.co m/using-mo dbus-fo r-pro cess-co ntro l-and-auto matio n-1
The Sc hne id e r Ele c tric Mo d ic o n Q uantum is a ve rs atile PLC us e d in a wid e varie ty o f s e c to rs inc lud ing manufac turing ,
wate r/was te wate r, o il and g as , c he mic al and mo re .
Industrial Protocol
MODBUS is the most popular industrial protocol being used today, f or good reasons. It is simple,
inexpensive, universal and easy to use. Even though MODBUS has been around since the past century
nearly 30 years, almost all major industrial instrumentation and automation equipment vendors continue to
support it in new products.
Although new analyzers, f lowmeters and PLCs may have a wireless, Ethernet or f ieldbus interf ace,
MODBUS is still the protocol that most vendors choose to implement in new and old devices.
Another advantage of MODBUS is that it can run over virtually all communication media, including twisted
pair wires, wireless, f iber optics, Ethernet, telephone modems, cell phones and microwave. T his means that
a MODBUS connection can be established in a new or existing plant f airly easily. In f act, one growing
application f or MODBUS is providing digital communications in older plants, using existing twisted pair
wiring.
In this articler, we’ll examine how MODBUS works and look at a f ew clever ways that MODBUS can be used
in new and legacy plants.
What is MODBUS?
MODBUS was developed by Modicon (now Schneider Electric) in 1979 as a means f or communicating with
many devices over a single twisted pair wire. T he original scheme ran over RS232, but was adapted to run
on RS485 to gain f aster speed, longer distances and a true multi-drop network. MODBUS quickly became a
de f acto standard in the automation industry, and Modicon released it to the public as a royalty f ree
protocol.
Today, MODBUS-IDA (www.MODBUS.org), the largest organized group of MODBUS users and vendors,
continues to support the MODBUS protocol worldwide. MODBUS is a “master-slave” system, where the
“master” communicates with one or multiple “slaves.” T he master typically is a PLC (Programmable Logic
Controller), PC, DCS (Distributed Control System) or RT U (Remote Terminal Unit).
MODBUS RT U slaves are of ten f ield devices, all of which connect to the network in a multidrop
conf iguration, Figure 1.
When a MODBUS RT U master wants inf ormation f rom a device, the master sends a message that contains
the device’s address, data it wants, and a checksum f or error detection. Every other device on the network
sees the message, but only the device that is addressed responds.
Slave devices on
MODBUS
networks cannot
initiate
communication;
they can only
respond. In other
words, they
speak only when
spoken to. Some
manuf acturers
are developing
“hybrid” devices
that act as
MODBUS slaves,
but also have
“write capability,”
thus making them
pseudo-Masters
at times.
The three most Fig ure 1. A MO DBUS RTU ne two rk c o ns is ts o f o ne “mas te r,” s uc h as a PLC o r DCS, and up to 247 “s lave ”
common d e vic e s c o nne c te d in a multi-d ro p c o nfig uratio n
MODBUS
versions used today are:
1. MODBUS ASCII
2. MODBUS RT U
3. MODBUS/T CP
All MODBUS messages are sent in the same f ormat. T he only dif f erence among the three MODBUS types is
in how the messages are coded.
In MODBUS ASCII, all messages are coded in hexadecimal, using 4-bit ASCII characters. For every byte of
inf ormation, two communication bytes are needed, twice as many as with MODBUS RT U or MODBUS/T CP.
T heref ore, MODBUS ASCII is the slowest of the three protocols, but is suitable when telephone modem or
radio (RF) links are used. T his is because ASCII uses characters to delimit a message. Because of this
delimiting of the message, any delays in the transmission medium will not cause the message to be
misinterpreted by the receiving device.
This can be important when dealing with slow modems, cell phones, noisy connections, or other
difficult transmission mediums.
In MODBUS RT U, data is coded in binary, and requires only one communication byte per data byte. T his is
ideal f or use over RS232 or multi-drop RS485 networks, at speeds f rom 1,200 to 115Kbaud. T he most
common speeds are 9,600 and 19,200 baud. MODBUS RT U is the most widely used industrial protocol, so
most of this paper will f ocus on MODBUS RT U basics and application considerations.
MODBUS/T CP is simply MODBUS over Ethernet. Instead of using device addresses to communicate with
slave devices, IP addresses are used. With MODBUS/T CP, the MODBUS data is simply encapsulated inside
a T CP/IP packet. Hence, any Ethernet network that supports T CP/IP should immediately support
MODBUS/T CP.
More details regarding this version of MODBUS will be covered in a later section entitled “MODBUS Over
Ethernet.”
To be continued…
Advertisement
Resource: Using MODBUS for Process Control and Automation – Moore Industries