51
Serial communication
The unit can communicate on serial line using the
Modbus
communication protocol with
RTU
coding.
The unit can be connected to an RS485 network by means of the serial interface supplied as an accessory, and respond to
requests from any master device connected to the network.
Serial line settings
The serial line must be set as follows :
•
baud rate
:
9600
•
data bits
:
8
•
stop bits
:
1
•
parity
:
even
All the devices connected to the same serial line MUST use the same settings.
Device address
To communicate correctly, each device connected to the serial network must have an univocal address (“
Modbus individual
address
”) of between 1 and 247. This address can be set by modifying the parameter
CF63
.
Modbus commands
The Modbus commands implemented by the controller are :
•
parameter reading
3
(Hex 03 : Read Holding Registers)
•
parameter writing
16
(Hex 10 : Write Multiple Registers)
Table of addresses
All the available resources are stored in the controller as WORD (2 byte) and therefore require the reading or writing of an enti-
re Modbus register. According to the Modbus protocol, to identify a register of address X the address X-1 must appear in the
message.
Some registers contain more than one piece of information : in this case the bits representing the resource value are identified
by means of the number of bits used (“Bit number”) and by the least significant bit (“Lsb”). In the writing operation for these regi-
sters it is necessary to read the current register value, modify the bits representing the resource concerned and rewrite the enti-
re register.
Example.
Bit number
=
4
Lsb
=
7
Resource value =
3
The resources can be read only (R), write only (W) or read and write (RW).
To interpret the value written in the register it is necessary to consider the value of CPL, EXP and UM :
CPL :
if the register represents a number with sign (CPL = Y) carry out the following conversion :
0
=
register value
<
32767
:
resource value = register value
32768
=
register value
<
65535
:
resource value = register value – 65536
EXP :
indicates the exponent of the power of 10 to be multiplied by the register value to obtain the resource value.
MU :
indicates the unit of measure of the resource
IMPORTANT.
DO NOT modify any parameter not indicated in the tables provided or indicated as a read only parameter (R),
otherwise the warranty will be cancelled.
0
1
1
0
1
0
0
1
1
1
0
1
1
0
1
0
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
EXP
Multiplier
-2
10
-2
0.01
-1
10
-1
0.1
0
10
0
1
1
10
1
10
2
10
2
100
ADJUSTMENT AND CONTROL