Civil Engineering Reference
In-Depth Information
5.4.1 Transmission modes
The Modbus protocol emerged in the mid-1970s as an early protocol for
linking terminals with Modicon PLCs using a master-slave (sometimes called
a master-client) relationship. It is a simple, open, message-based protocol,
and has been accepted as a standard in the industry very quickly. It supports
asynchronous point-to-point and multidrop communications and can be
used with a variety of serial interfaces (e.g. RS-232, RS-422, RS-485 and
modems).
ASCII and RTU are the two possible transmission modes of the original
Modbus specifications. Modbus RTU (Remote Terminal Unit) mode is the
most common implementation, using binary coding and CRC error checking.
Modbus ASCII messages (though somewhat more readable because they use
ASCII characters) are less efficient and use less effective longitudinal redund-
ancy check (LRC) error checking. ASCII mode uses ASCII characters to
begin and end messages whereas RTU uses time gaps (3.5 character times) of
silence for framing. The two modes are incompatible so a device configured
for ASCII mode cannot communicate with one using RTU.
Modbus/TCP is a much more recent development, created to allow
Modbus ASCII/RTU protocol to be carried over TCP/IP-based networks.
Modbus/TCP embeds Modbus messages inside TCP/IP frames. Modbus/TCP
sets up connections between nodes on the network, sending requests via TCP
in a half-duplex fashion. TCP allows multiple requests to be 'pipelined', or
queued in a buffer waiting to be serviced. Modbus/TCP has the capability to
use transaction identifiers (sequence numbers).
5.4.2 Architecture and communication process
Modbus devices communicate using a master-slave technique in which only
one device (the master) can initiate transactions (called queries). The other
devices (slaves) respond by supplying the requested data to the master, or by
taking the action requested in the query. A slave is any peripheral device (I/O
transducer, valve, network drive, or other measuring device) which processes
information and sends its output to the master using Modbus.
Masters can address individual slaves, or can initiate a broadcast message
to all slaves. Slaves return a response to all queries addressed to them indi-
vidually, but do not respond to broadcast queries.
A master's query consists of a slave address (or broadcast address), a
function code defining the requested action, any required data, and an error
checking field. A slave's response consists of fields confirming the action
taken, any data to be returned, and an error-checking field. If no error occurs,
the slave's response contains the data requested. If an error occurs in the
query received, or if the slave is unable to perform the action requested, the
slave will return an exception message as its response. The error-checking
field of the message frame allows the master to confirm that the contents of
Search WWH ::




Custom Search