You are on page 1of 6

ABB si riserva tutti i diritti su questo documento e sulle informazioni in esso contenute.

Riproduzione, uso o rivelazione di questo documento a terze parti, senza espressa

autorizzazione, sono severamente proibite.  ABB Energy Automation SpA; 2004

Modbus Specification & Configuration


Design.type N°Part
Prep. Nicola Albi 19-08-0416- Typedoc. Technical Specification Pages

Approv. Fabio Papetti Title Modbus Specification & 6
Rept.resp. Configuration AC800M
Doc.N° Langua Ind.rev. Page

ABB Energy Automation SpA eng 1 1

Modbus Specification & Configuration


IEC 1131 Standard programming method.

I/O module Is an active, electronic and signal conditioning unit.

be a part of an I/O device or a S800L I/O module.

AC 800M A hardware platform, comprising Processor Units,

communication interfaces and other supporting
that can be configured to provide a controlle

MODBUS RTU Standard serial Protocol

Doc.N° Language Ind.rev. Page

ABB Energy Automation SpA eng 1 2

Modbus Specification & Configuration

MODBUS RTU is a standard protocol widely spread because of its ease of use and the fact that it
supports communication over a wide variety of media, such as wire, fiber optics, radio and the
MODBUS is executed serially and asynchronously according to the master/slave principle, and in
one direction at a time.
However, only master functionality is implemented in the AC 800M controller. MODBUS is used
mainly for reading and writing variables between control network devices, using point-to-point or
multi-drop communication.
Message framing is implemented in RTU mode, which is a binary format. The MODBUS protocol is
designed to transfer data securely by checking each byte as well as the entire message for
transmission errors.

2.1 Services Provided

A number of MODBUS commands are supported. The application programmer can access the
protocol functions through function blocks, according to the IEC 61131-5 standard.
The protocol software translates the request from connect, exception, read, and write blocks into
MODBUS protocol commands called function code (FC).

Protocol Description Protocol Description

FC1 Read coil status FC6 Preset single register
FC2 Read input status FC7(1) Read exception status
FC3 Read holding registers FC8(1) Diagnostic request
FC4 Read input registers FC15 Force multiple coils
FC5 Force single coil FC16 Preset multiple
(1) Some slaves do not understand FC8 and FC7.


3.1 Introduction
Communication with MODBUS takes place serially and asynchronously according to the
master/slave principle.
• The master channel of a system controls the communication of devices with slave function.
• A device with slave function is connected via a slave channel and its communication is controlled
from a master channel.

Doc.N° Language Ind.rev. Page

ABB Energy Automation SpA eng 1 3

Modbus Specification & Configuration

3.2 Design Examples

3.2.1 Point-to-Point Communication

Point-to-point communication means that only one slave system is connected to the master
channel, as shown in Figure.


3.2.2 Multidrop Communication

Multi-drop communication means that several slaves are connected in parallel to the serial master
channel (see Figure ). Note that the master can only address one of the slaves at a time.
Also note that, unlike the point-to-point design, only one RS- 232C channel with an appropriate
converter is needed.

slave slave slave

3.3 Hardware
MODBUS RTU can be used on the build in COM3 port or in the build in COMx port of the CI853
An RS-232C communication channel is required (and possibly an RS-232C/485 converter).
Maximum cable lengths are 15 m for RS-232C and 1200 m for RS-485.
Cable length can be extended considerably (to several km) using a fiber optic converter.
The CI853 supports Hot Swap.

3.4 Performance
Performance is affected by transmission speed, message length and application load.
For RS-232C channels a baud rate can be selected between 2400 and 19200 bit/s.
To send one byte requires 11 bits (start bit, 8 data bits, parity bit and stop bit).
Consequently 9600/11 = 872 bytes per second can be sent if the baud rate is 9600.
The maximum transmission distance depends on the interface used and the transmission speed.
Use RS-232C for short distances, maximum 15 meters. Use an appropriate converter for longer
Note that a noisy electrical environment may require shorter distances.
In AC 800M, servicing the S800 I/O module has highest priority.
Execution of the application program (IEC 1131-code written by the user) has next highest priority.
Communication handling has lowest priority, and communication performance is therefore affected
by the load from higher prioritized tasks.

Doc.N° Language Ind.rev. Page

ABB Energy Automation SpA eng 1 4

Modbus Specification & Configuration
In a system acting as master, the communication performance is of course affected by the
execution interval of the communication function blocks in the application program. Response is
handled in the background; it is not triggered by the application program in the slave system, but is
slowed down if the application load is high.
Register and coils are two terms referring to the Modbus protocol. Registers (16 bit integers 0-
65535) are mapped to the data types int (integer, 16 bits), dint (double integer, 32 bits)
or uint (unsigned integer, 16 bits), and coils are mapped to the data type bool (Boolean).
All other data type should be linearized at application level of the program.
All parameters (both registers and coils) must be of the same type if sending several values in one
function block. That is mixing of variables of different types (int, dint, uint or bool) within the same
function block is not allowed.
The maximum number of registers that can be sent in one message is 32, independent of the
variable type. Boolean variables must be transferred either as a single variable or in multiples of
eight, maximum 512.
A long message takes longer to transmit than a short one, but it is always more efficient to use
long messages if a large data area is to be transmitted.

3.5 Limitations
• Only master functionality is implemented.
• Only RTU mode is implemented (only binary values are used).
• Communication using a dial-up modem is not possible.
• No support for broadcast.

3.6 Redundancy
Redundancy is not built in, but can be implemented on application level or physical (cable) level by
the user, by adding another CI853 module and configure the necessary redundant functions in the
application program and is defined by . Redundancy architecture is represented in figure below.

RS-232c/485 converter

Ch. A Ch. B

Channel redundancy

Doc.N° Language Ind.rev. Page

ABB Energy Automation SpA eng 1 5

Modbus Specification & Configuration

3.7 Database
The database fields of the Modbus driver can take the following values:

SL-ADR: Device Number (Slave address).

REG-ADR: it mean
• Address of the Modbus register..

BIT-POS: it mean
• Digital in a Bit Position [0-15] (for Packed Data only in a word)

POLL: it mean: polling time accepted by slave.

MB-S-T: Modbus signal type:

The function to be used to read or write the data is:

ANALOG_TYPE: Modbus data type.


0 DT_USHORT Unsigned short (1 register, HO LO)
1 DT_SSHORT Signed short (1 register, HO LO)
2 DT_ULONG_HL Unsigned long (2 register, HO LO)
3 DT_SLONG_HL Signed long (2 register, HO LO)
4 DT_IEFLOAT_HL IEEE float (2 register, HO LO)
5 DT_ULONG_AEG Unsigned long (2 registers, AEG Modicon)
6 DT_SLONG_AEG Signed long (2 registers, AEG Modicon)
7 DT_IEFLOAT_LH IEEE float (2 register, LO HO)
8 DT_IEFLOAT_SW IEEE float (2 register, word swap)
9 DT_ULONG_LH Unsigned long (2 register, LO HO)
10 DT_SLONG_LH Signed long (2 register ,LO HO)
11 DT_PACKED Packed Data (1 register each bit 1 digital point)

The third part package has to compile the database with the field of item descripted.
See “system”_Mdbus_db_rev”XXX”.xls template.

Doc.N° Language Ind.rev. Page

ABB Energy Automation SpA eng 1 6