
72
72
SIF5600 - Manual - 03 - 2008
Each bit stands for one element: 0=off, 1=on.
ModBus maps it into two consecutive registers.
Basic data, moreover, are linked into STRUCTURES according to their own utilization: the structure is a
group of basic data organized in a well defined order.
Data structures are univocally defined by a number in the range 1…N.
The ModBus protocol is reported to the data with reference to the number of structure NUM, that is compared
to a sort of virtual address: the ModBus rules foresee that in the messages the ADR structure address is
reported, coincident to NUM minus one (from 0 to N-1).
To approach structure, the following informations are needed:
- the virtual structure address (ADR, corresponding to NUM-1)
- the structure size (DIM)
Reading and/or writing multiple consecutive structures is allowed, the ‘size’ must be the sum of the sin-
gle DIM of the contiguous structures of interest up to a max limit of 32 (DIM=32)
Section 6 collects the read only RREG structures.
Section 7 collects the read/write WREG structures.
Section 8 collects WREG structures for command activations.
2.3 Data interface with Modbus protocol
The implemented ModBus functions are:
- data reading
- reading and change of configuration parameters
- command actuations
- communication diagnostic test
The protocol introduces standard interface functions to read or write registers and carry out diagnostic
test, identified by a well defined numerical code FUNC.
Data reading is performed through the functions:
- FUNC=04 -> reading RREG registers
- FUNC=03 -> reading WREG registers
The writing of data or the actuation of commands, are performed through the functions:
- FUNC=06 -> writing of one register WREG
- FUNC=16 -> writing of one or more registers WREG
Commands execution is performed writing the values specified in the command register; at the end of the
execution the register are automatically cleared by the protection. It is possible to read the command
registers as well as any other register.
The diagnostic test of the communication line is performed through the ‘loopback test’ ModBus function:
- FUNC=08 -> loopback test
SECTION 3 MODBUS
3.1 General
The protection implements a functional subset of the RTU ModBus protocol:
FUNC 04: read input register
FUNC 03: read output register
FUNC 06: preset single register
FUNC 16: preset multiple registers
FUNC 08: loopback diagnostic test
The ModBus protocol allows communication within a master unit (personal computer or supervisor) and dif-
ferent slave devices (multi point system), in our case a protection system. Every protection is univocally
identified by an address (Slave address) programmable in the field 1...247.
The ‘broadcast addressing’ (address=0) allows the dispatching of a message to all the protections of the
system: every protection manages the message but it doesn’t send back response to avoid collision on the
bus.
The protection allows the remote connection with interface RS485 half-duplex, or local with interface
RS232, through the ModBus RTU protocol.
In remote mode, the protection is shaped as Slave in a multidrop system and it answers only if addressed
by the master (personal computer or supervisor) with own address (1...247).
In local mode, the protection results to be in point-to-point connection, or individual with the master
(personal computer), it answers any request ignoring the address.
3.2 ModBus communication
A ModBus communication consists of dispatching of a ‘request’ message from the master unit (personal
computer or supervisor) toward the protection, with consequent, if everything is all right, response from
slave; three cases are introduced:
- response ok
- response reports some error (see ‘exception response’)