Modbus Protocol Specification For Prometer 100
Modbus Protocol Specification For Prometer 100
Communication Protocol
Doc Version 004
Table of Content
1 INTRODUCTION .............................................................................................................. 2
1.1 Purpose of the Communications Protocol ............................................................................ 2
2 Modbus implementation on the Prometer 100 .................................................................. 2
2.1 Ground Rules .......................................................................................................................... 2
2.1.1 For RS485 ....................................................................................................................................... 2
2.1.2 For TCP/IP ...................................................................................................................................... 3
2.2 Configuring Modbus communication ................................................................................... 3
2.2.1 For RS485 ....................................................................................................................................... 3
2.2.2 For TCP/IP ...................................................................................................................................... 3
2.3 Modes of Transmission .......................................................................................................... 3
2.4 Description of the MODBUS packet structure over RS485................................................ 3
2.4.1 Slave Address Field ........................................................................................................................ 3
2.4.2 Function Field ................................................................................................................................. 4
2.4.3 Data Field........................................................................................................................................ 4
2.4.4 Error Check Field (Checksum) ....................................................................................................... 4
2.5 Description of the MODBUS packet structure over TCP/IP.............................................. 5
2.5.1 MBAP Header description .............................................................................................................. 5
2.6 Exception Responses .............................................................................................................. 5
2.6.1 Format of the exception response ................................................................................................... 6
3 PACKET COMMUNICATIONS ....................................................................................... 6
3.1 Function 03: Read Holding Registers ................................................................................... 6
3.2 Function 16: Preset Multiple Registers ................................................................................ 7
4 Interpretations of MODBUS registers ............................................................................... 9
4.1 Meter information .................................................................................................................. 9
4.1.1 Meter Serial Number ...................................................................................................................... 9
4.1.2 Meter Software Name ..................................................................................................................... 9
4.1.3 Meter Real Time ............................................................................................................................. 9
4.1.4 Meter Date and Time .................................................................................................................... 10
4.1.5 Protocol Version and Revision: .................................................................................................... 10
4.1.6 Tamper interpretation ................................................................................................................... 11
4.1.7 Meter Info ..................................................................................................................................... 11
4.1.8 MODBUS ID ................................................................................................................................ 12
4.1.9 MODBUS Default Baud Rate ....................................................................................................... 12
4.1.10 Previous SIP (Survey Integration Period) Status Flag .................................................................. 13
4.1.11 TOU Rate registers and Energy channels ..................................................................................... 14
5 Modbus Register mapping ............................................................................................... 14
6 Document History............................................................................................................. 14
1 INTRODUCTION
This document describes the MODBUS communications protocol employed by the Prometer 100 and
how to pass information into and out of the Prometer 100 in a MODBUS network. It is assumed that
the reader is familiar with the MODBUS protocol and serial communications in general.
Port No : 502
Note: It is recommended that only one channel at a time shall be used for modbus communication for
best response for modbus mapping version 0x0B00.
Note: It is recommended that client shall use minimum 1000ms for slave response timeout for
modbus mapping version 0x0B00 and 400 ms for modbus mapping version 0x0B01. In version
0x0B01 few modbus group are quick responsive hence user can access it by reducing slave response
timeout.
The Prometer 100 is capable of communication on RS-485 serial communication standards. The RS-
485 medium allows for multiple devices on a multi-drop network.
The following rules define the protocol for information transfer between a MODBUS Master device
and the Prometer 100.
NPD_SW_QF_171 Version Modbus Protocol Page 2 of 15
005 Specification for
Apex100 Meter
Modbus Protocol Specification for Apex100 Meter
1. IP address is used for addressing the Server (Slave) (Note that Modbus slave ID is not used
in this scheme for slave addressing).
2. At a time only one socket is allowed in Sever for modbus communication. I.e. more than one
Client can’t establish a modbus communication to a server simultaneously.
Example 2.1:
A 16-bit register contains the value 3F97 Hex. This register is transmitted:
High order byte = 3F Hex
Low order byte = 97 Hex
This register will be transmitted in the order 3F 97.
The MODBUS ‘slave address’ field usually used on MODBUS Serial Line is replaced by a single
byte ‘Unit Identifier’ within the MBAP Header. The ‘Unit Identifier’ is used to communicate via devices
such as bridges, routers and gateways that use a single IP address to support multiple independent
MODBUS end units. The Prometer 100 supports only single unit per IP address.
All Modbus/TCP ADU are sent via TCP on registered port 502.
Remark: the different fields are encoded in Big-endian.
The data field of an exception response contains the exception error code. Table 2 describes the
exception codes supported by the Prometer 100 and their possible causes.
Except for the broadcast messages, when a master device sends a query to a slave device it expects
a normal response. One of four possible events can occur from the master's query.
1. If the slave device receives the query without a communication error, and can handle the
query normally, it returns a normal response.
2. If the slave doesn't receive the query due to a communication error, no response is returned.
The master program will eventually process a timeout condition for the query.
3. If the slave receives the query, but detects a communication error (CRC), no response is
returned. The master program will eventually process a timeout condition for the query.
4. If the slave receives the query without communication error, but cannot handle it (for example,
if the request is to read a non-existent coil or register), the slave will return an exception
response informing the master of the nature of the error.
3 PACKET COMMUNICATIONS
This section will illustrate the MODBUS functions supported by the Prometer 100.
The Prometer 100 responds with a packet containing the values of the registers in the range defined
in the request.
Figure 3-1 shows the Read Holding / Input Registers request and response packet formats, and an
example transaction.
READ HOLDING REGISTERS
Read Register Request Packet (Master station to Read Register Response Packet (Prometer 100 to
Prometer 100) Master station)
Unit ID/Slave Address (1 byte) Unit ID/Slave Address (1 byte)
03 (Function code) (1 byte) 03 (Function Code) (1 byte)
Start Register (sr) (2 bytes) Byte Count (2 x nr) (1 byte)
Number of Registers to Read (nr) (2 bytes) First Register in range (2 bytes)
CRC Checksum (2 bytes) Second Register in range (2 bytes)
……
CRC Checksum (2 bytes)
Example 3.1:
Prometer 100 is configured as a MODBUS slave device, with slave address 001. The Master station
requests to read the Instantaneous voltage in phase R.
Modbus Register address for the same parameter is 1101 and 1102 (4 byte value).
Modbus tool has to send address as 1100d.
Request Packet
Slave Function Start Reg Start Reg Count Count CRC CRC
Address (HI) (LO) (HI) (LO) (HI) (LO)
01 03 04 4C 00 02 04 EC
Response Packet
Example 3.2:
Prometer 100 is configured as a MODBUS slave device with slave address 001. The time in the meter
is required to be synchronized with the master. The formal of time is terms of number of seconds
since 1" January 1988. The value of Real time (Registers 1055-56) needs to be adjusted to
33367EBF(Hex)
Slave address: 001 = 01 (Hex) Start register: 1054 = 041E (Hex)
Value 1: = 3336 (Hex) Value 2: = 7EBF (Hex)
Request Packet (The white background denotes the DATA field of the packet.)
Response Packet:
Slave Function Start Reg Start Reg Count Reg Count Reg CRC CRC
(HI) (LO) (HI) (LO) (HI) (LO)
01 10 04 1E 00 02 20 FE
Example 3.3:
Prometer 100 is configured as a MODBUS slave device with slave address 001. The time in the meter
is required to be synchronized with the master. The format of time is Date and Time (YYYY MM DD
HH MM SS). The value of Real time (Registers 1057-60) needs to be adjusted to 07DF041102213300
(Hex)
Slave address: 001 = 01 (Hex) Start register: 1056 = 0420 (Hex)
Value 1: = 07DF (Hex) Value 2: = 0411 (Hex)
Value 3: = 0221 (Hex) Value 4: = 3300 (Hex)
Year – 07DFh, Month – 04h, Date – 11h, Hour – 02h, Minutes – 21h and Seconds – 0033h
Request Packet (The white background denotes the DATA field of the packet.)
Slave Function Start Start Reg Count Count Byte Reg 1 Reg 1 Reg 2
Reg (HI) (LO) Reg Reg Count (HI) (LO) (HI)
(HI) (LO)
01 10 04 20 00 04 08 07 DF 04
Reg 2 (LO) Reg 3 (HI) Reg 3 (LO) Reg 4 (HI) Reg 4 (LO) CRC (HI) CRC (LO)
11 02 21 33 00 EE AF
Response Packet:
Slave Function Start Reg Start Reg Count Reg Count Reg CRC CRC
(HI) (LO) (HI) (LO) (HI) (LO)
01 10 04 20 00 04 C1 30
Note:
Meter allows time synching within time adjustment limit. Maximum time adjustment limit can be
configured 30 second.
Let’s say maximum time adjustment limit is configured as 25 seconds, Meter will reject time synch
request if time drift (packet data) is beyond the 25 seconds.
15:6:27
22-11-2006
Wednesday
Time Conversion.xls
Valid range for year is meter manufacture year to (manufacture year + 20 years)
Valid range for date is 1 to 28 / 29 / 30 / 31 (based on month & year)
Valid range for month is 1 to 12
Valid range for hour is 0 to 23 (24 hour clock)
Valid range for minute is 0 to 59
Valid range for second is 0 to 59
Example
For register 1063 to 1066 Values returned “07 DC 09 03 12 17 07 00” will be interpreted as
Year – 07DCh
Month – 03h 09 Mar 2012
Date – 09h
Hour – 12h
Minutes – 17h 18:23:07
Seconds – 07h
Note: For time set user has to write in 4 registers together, but user has liberty to read only date (2
register) or time (2 register) individually.
7 6 5 4 3 2 1 0
L2 CTO ETBC Open C Imbalance CT Bypass L1 CTO L3 CTR L2 CTR L1 CTR
15 14 13 12 11 10 9 8
Cover L3 Feeder Invalid V L3 VT L2 VT L1 VT
Open CTO Fail Volt Unbalance Miss Miss Miss
23 22 21 20 19 18 17 16
Inv. Ph. Assoc. L3 CT Miss L2 CT Miss L1 CT Miss Magnet X L1 VTHD ND
31 30 29 28 27 26 25 24
X Low Vol. High Vol. L3 LTHD L3 LTHD L1 LTHD L3 VTHD L2 VTHD
Note: d If bit value is 1 than event condition persist. (Register 2804 LSB is Bit 0 and MSB is Bit 15,
Register 2803 LSB is Bit 16 and MSB is Bit 31, Register 2802 LSB is Bit 32 and MSB is Bit 47,
Register 2801 LSB is Bit 48 and MSB is Bit 63)
Modbus Reg address for the same parameter is 1023 and 1024 (4 byte value).
Modbus tool has to send address as 1022d.
Request Packet (The white background denotes the DATA field of the packet.)
Slave Function Start Reg Start Reg Count Reg Count Reg CRC CRC
(HI) (LO) (HI) (LO) (HI) (LO)
01 03 03 FE 00 02 A5 BF
4.1.8 MODBUS ID
Prometer 100 is configured as a MODBUS slave device, with slave address 001. The Master station
requests to read the MODBUS ID.
Modbus Reg address for the same parameter is 1051 and 1052 (4 byte value).
Modbus tool has to send address as 1050d.
Request Packet (The white background denotes the DATA field of the packet.)
Slave Function Start Reg Start Reg Count Reg Count Reg CRC (HI) CRC
(HI) (LO) (HI) (LO) (LO)
01 03 04 1A 00 02 E4 FC
Slave Function Start Reg Start Reg Count Reg Count Reg CRC CRC
(HI) (LO) (HI) (LO) (HI) (LO)
01 03 04 1C 00 02 04 FD
DATA field “Reg 1 and Reg 2’ contains the MODBUS Default Baud Rate in Hex.
Here ‘00002580’ represents “the MODBUS Default Baud Rate is 9600”.
7 6 5 4 3 2 1 0
CT Parameter Time Time Time Ignore all bit
Alarm Disturbed
reverse change Adjusted advance retard information
12 11 10 9 8
Low Voltage Power loss Battery fail VT Miss DST
Note-1: For SIP (Survey Integration Period) duration less than 5 min, error response (Invalid
address) will be replied for this group (Logger 1)
Status Flag bit interpretation (If bit value is 1 than condition is true)
Note-2: For 3 Phase average voltage and Avg. frequency for Previous SIP Parameter group if
value returned as floating point representation of FFFF in 4 bytes (i.e.-1) then same should be
treated as invalid values.
Example:- FFFF values get if meter powered off for previous full SIP or time set in meter for
more the one SIP duration.
The TOU energy channel interpretation will be as follows. Bit Set means Energy configured and vice a
versa.
Bit 0 - Active import (Fundamental + Harmonics)
Bit 1 - Active Export (Fundamental + Harmonics)
Bit 2 - Active import (Fundamental)
Bit 3 - Active Export (Fundamental)
Bit 4 - Reactive - Quadrant 1
Bit 5 - Reactive - Quadrant 4
Bit 6 - Reactive - Quadrant 2
Bit 7 - Reactive - Quadrant 3
Bit 8 - Apparent while active import
Bit 9 - Apparent while active export
Bit 10 - Reactive Import (Q1+Q2)
Bit 11 - Reactive Import (Q3+Q4)
Bit 12 - Reactive Lag (Inductive) (Q1+Q3)
Bit 13 - Reactive Lead (Capacitive) (Q2+Q4)
Prometer Prometer
100_0B00.xlsx 100_0B01.xlsx
Note1:
For following parameters if value returned as floating point representation of FF in 4 bytes
(i.e.-1) then same should be treated as invalid values.
MODBUS Register Parameter Description Unit R/W Format
Previous SIP
1805 TO 1806 Last SIP Frequency Hz R 32 bits FP
Average Frequency
Previous SIP Avg
1807 TO 1808 Last SIP Voltage Volt R 32 bits FP
Voltage
6 Document History
Version Date of Written by Reviewed by Approved by
Completed
001 23/03/2015 Monorom Deb Sushil Jangid Prometer 100 Team
Initial Version