003 Modbus Message Structure

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Modbus message structure

The Modbus communication interface is built around messages. The format of these Modbus messages is independent of the
type of physical interface used. On plain old RS232 are the same messages used as on Modbus/TCP over ethernet. This gives
the Modbus interface definition a very long lifetime. The same protocol can be used regardless of the connection type. Because
of this, Modbus gives the possibility to easily upgrade the hardware structure of an industrial network, without the need for
large changes in the software. A device can also communicate with several Modbus nodes at once, even if they are connected
with different interface types, without the need to use a different protocol for every connection.

On simple interfaces like RS485 or RS232, the Modbus messages are sent in plain form over the network. In this case the
network is dedicated to Modbus. When using more versatile network systems like TCP/IP over ethernet, the Modbus messages
are embedded in packets with the format necessary for the physical interface. In that case Modbus and other types of
connections can co-exist at the same physical interface at the same time. Although the main Modbus message structure is
peer-to-peer, Modbus is able to function on both point-to-point and multidrop networks.

Each Modbus message has the same structure. Four basic elements are present in each message. The sequence of these
elements is the same for all messages, to make it easy to parse the content of the Modbus message. A conversation is always
started by a master in the Modbus network. A Modbus master sends a message and—depending of the contents of the
message—a slave takes action and responds to it. There can be more masters in a Modbus network. Addressing in the message
header is used to define which device should respond to a message. All other nodes on the Modbus network ignore the message
if the address field doesn't match their own address.

You might also like