Modbus: 4.1 Communication Between Modbus Devices

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

4. Modbus [ref.

5, 7 & 8]
Modbus is an application layer messaging protocol, positioned at level 7 of the OSI model, which
provides client/server communication between devices connected on different types of buses or
networks. The industry s serial de facto standard since 1979, truly open and the most widely used
network protocol in the industrial manufacturing environment. The Modbus protocol provides an
industry standard method that Modbus devices use for parsing messages.

The Internet community can access Modbus at a reserved system port 502 on the
TCP/IP stack. Modbus is used to monitor and program devices; to communicate intelligent
devices with sensors and instruments; to monitor field devices using PCs and HMIs. [ref. 8]

4.1 Communication between Modbus devices


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 individually, but do not respond to broadcast queries

4.2 Modbus Register Map


Modbus devices usually include a Register Map. Modbus functions operate on register map
registers to monitor, configure, and control module I/O. You should refer to the register map for
your device to gain a better understanding of its operation.

4.3 Serial Transmission Modes of Modbus networks


The transmission mode defines the bit contents of the message bytes transmitted along the
network and how the message information is to be packed into the message stream and
decoded. Standard Modbus networks employ one of two types of transmission modes:
ASCII Mode
RTU Mode

The mode of transmission is usually selected along with other serial port communication
parameters (baud rate, parity etc.) as part of the device configuration.

ASCII Transmission Mode


In the ASCII Transmission Mode (American Standard Code for Information Interchange), each
character byte in a message is sent as 2 ASCII characters. This mode allows time intervals of up
to a second between characters during transmission without generating errors.

RTU (Remote Terminal Unit) Transmission Mode


In RTU (Remote Terminal Unit) Mode, each 8-bit message byte contains two 4-bit hexadecimal
characters, and the message is transmitted in a continuous stream. The greater effective
character density increases throughput over ASCII mode at the same baud rate. [ref. 8]

4.4 Modbus Message Framing


A message frame is used to mark the beginning and ending point of a message allowing the
receiving device to determine which device is being addressed and to know when the message is
completed. It also allows partial messages to be detected and errors flagged as a result.

A Modbus message is placed in a message frame by the transmitting device. Each word
of this message (including the frame) is also placed in a data frame that appends a start bit, stop
bit, and parity bit. In ASCII mode, the word size is 7 bits, while in RTU mode; the word size is 8
bits. Thus, every 8 bits of an RTU message is effectively 11 bits when accounting for the start,
stop, and parity bits of the data frame.

10

You might also like