Carlo Gavazzi Em210 Modbus Protocol
Carlo Gavazzi Em210 Modbus Protocol
Carlo Gavazzi Em210 Modbus Protocol
COMMUNICATION
PROTOCOL
Version 4 Revision 1
1.1 Introduction
The RS485 serial interface supports the MODBUS/JBUS (RTU) protocol. In this document only the
information necessary to read/write from/to EM210 has been reported (not all the parts of the protocol
have been implemented).
For a complete description of the MODBUS protocol please refer to the
“Modbus_Application_Protocol_V1_1a.pdf” document that is downloadable from the www.modbus.org
web site.
IMPORTANT:
1) In this document the “Modbus address” field is indicated in two modes:
1.1) “Modicom address”: it is the “6-digit Modicom” representation with Modbus function code
04 (Read Input Registers). It is possible to read the same values with function code 03 (Read
Holding Registers) replacing the first digit (“3”) with the number “4”.
1.2) “Physical address”: it is the “word address” value to be included in the communication
frame.
2) The functions 03h and 04h have exactly the same effect and can be used indifferently.
3) The communication parameters are to be set according to the configuration of the instrument
(refer to EM210 instruction manual)
Request frame
Description Length Value Note
Physical address 1 byte 1 to F7h (1 to 247)
Function code 1 byte 03h
Starting address 2 bytes 0000h to FFFFh Byte order: MSB, LSB
Quantity of registers (N word) 2 bytes 1 to 10h (1 to 11) Byte order: MSB, LSB
CRC 2 bytes
Request frame
Description Length Value Note
Physical address 1 byte 1 to F7h (1 to 247)
Function code 1 byte 04h
Starting address 2 bytes 0000h to FFFFh Byte order: MSB, LSB
Quantity of registers (N word) 2 bytes 1 to 10h (1 to 11) Byte order: MSB, LSB
CRC 2 bytes
Request frame
Description Length Value Note
Physical address 1 byte 1 to F7h (1 to 247)
Function code 1 byte 06h
Starting address 2 bytes 0000h to FFFFh Byte order: MSB, LSB
Register value 2 bytes 0000h to FFFFh Byte order: MSB, LSB
CRC 2 bytes
Request frame
Description Length Value Note
Physical address 1 byte 1 to F7h (1 to 247)
Function code 1 byte 08h
Sub-function 2 bytes 0000h
Data (N word) N *2 bytes Data Byte order: MSB, LSB
CRC 2 bytes
Broadcast mode
In broadcast mode the master can send a request (command) to all the slaves. No response is returned
to broadcast requests sent by the master. It is possible to send the broadcast message only with
function code 06h using address 00h.
1. To avoid errors due to the signal reflections or line coupling, it is necessary to terminate the bus at
the beginning (master side, if not already embedded, by inserting a 150 ohm 1/2W 5% resistor
between line B and A) and at the end (by connecting the terminals B+ and T in the last instrument).
2. The network termination is necessary even in case of point-to-point connection and/or of short
distances.
3. For connections longer than 1000m or if in the network there are more than 160 instruments (with
1/5 unit load as used in EM210 interface), a signal repeater is necessary.
4. For bus connection it is suggested to use an AWG24 balanced pair cable and to add a third wire for
GND connection. Connect GND to the shield if a shielded cable is used.
5. The GND is to be connected to ground only on the master side.
6. If an instrument does not answer within the “max answering time”, it is necessary to repeat the
query. If the instrument does not answer after 2 or 3 consecutive queries, it is to be considered as
not connected, faulty or reached with a wrong address. The same consideration is valid in case of
CRC errors or incomplete response frames.
MODBUS timing
2 TABLES
The variables are represented by integers or floating numbers, with 2’s complement notation in case of
“signed” format, using the following:
For all the formats the byte order (inside the single word) is MSB->LSB. In INT32, UINT32 and UINT64
formats, the word order is LSW-> MSW.
Geometric representation
According to the signs of the power factor , the active power P and the reactive power Q, it is possible
to obtain a geometric representation of the power vector, as indicated in the drawing below, according
to EN 60253-23:
The maximum electrical input values are reported in electrical data sheet. The overflow indication “EEE“
is displayed when the MSB value of the relevant variable is 7FFFh.
Notes : Negative values correspond to exported active power, positive values correspond to imported active power.
If Measuring system parameter is configured for 1-phase or 2-phase systems, the values relevant to phase 2 and 3 can still be read with a
valid value, equal to 0
Application menu
Value=2: C (default)
Value=3: D
Value=4: E
Value=5: F
Reset commands
Serial number
Production year
Secondary address
Note.
A default value is automatically assigned to the parameters when an out-of-range or invalid value is written.
The default value is the minimum valid value.
3 Revisions
Version 3 Revision 1:
Version 3 Revision 2:
Changed par. Function 08h (Diagnostic with sub-function code 00h) (EM210 synchronized)
Version 3 Revision 3:
Notes: new variables available only from FW revision A.5
Removed all references to MID versions.
Table 2.3-1and Table 2.4-1: added THD variables, (calculated) neutral current and Hour
counter meters (positive and negative).
Added parameter: “THD Calculation enabling”.
Added parameter: “Start current for hours counting”.
Updated “Reset Commands”.
Add note in 2.8 section.
Version 4 Revision 0:
Notes: new variables available only from FW revision A.6
Table 2.8-4: added wrong connection variables.
Version 4 Revision 1:
Improvement of paragraph 1.3 “Application notes” (points 1 and 5)