Acquiring and Processing Meter Data
29 (46)
Modbus Register Layout
The Anybus M-Bus to Modbus-TCP gateway uses a fixed address structure of 10 Modbus registers per
meter/meter value. Addresses are enumerated starting with 0.
•
Data types using more than one register are encoded with the most significant word at the lowest
address.
•
The function code 0x03 (Read Holding Register) is used for reading the data.
Within the Modbus protocol, data is formatted as either integer or float. Other data types, such as BCD, are
converted to integer values before transmission.
The first 10 Modbus register, starting at address 0, are status registers of the gateway:
Address
Name
Length
Description
0 - 1
Serial number
32 Bit
Serial number of the gateway in hexadecimal format
2
Protocol version
16 Bit
Protocol version for the Modbus interface (value = 1)
3
Version
16 Bit
Software version of the gateway (as integer)
4 - 5
Time stamp
32 Bit
Unix timestamp of last read-out
Device system time must be set correctly (manually or via SNTP)
6
Reserved
Reserved
7
Type field / reserved
16 Bit
Type field for register set in the upper Byte (value=1 for device entry),
lower byte is reserved
8 - 9
Reserved
Reserved
Each meter is characterized by 10 Modbus registers. Their offset has to be added to the starting register
address for each meter. They are defined as follows:
Offset
Name
Length
Description
0 - 1
Serial number
32 Bit
Serial number of meter as integer value (not BCD), only decimal
numbers allowed
2
Manufacturer ID
16 Bit
Encoding of manufacturer by using different blocks of Bits: Bits 10 - 14:
first character, Bits 5 - 9: second character and Bits 0 - 4: third character,
the particular values point to the three letters, counting from "A" with
value 1
3
Version / medium
16 Bit
Version of meter in the upper Byte and the medium ID in the lower Byte
4 - 5
Time stamp
32 Bit
Unix timestamp of last meter read-out, system time of the gateway shall
be set correctly (manually or via SNTP)
6
Reserved
Reserved
7
Type field / reserved
16 Bit
Type field for register set in the upper Byte (value=2 for meter entry),
lower byte is reserved
8
Flags
16 Bit
Bit 0: Value 1: Meter could not be read, Value 0: Meter could be read
correctly
Bit 1: Value 1: Not all meter values are updated, Value 0: All meter
values updated
Bit 2–15: Reserved
9
Reserved
Reserved
Each meter value is characterized by 10 Modbus registers. Their offset has to be added to the starting
register address for each meter value. They are defined as follows:
Offset
Name
Length
Description
0 - 3
Meter value
64 Bit
Signed integer value (not scaled)
4 - 5
Meter value
32 Bit
Floating point value (scaled to unit in register 7), IEEE 754
6
Scale factor
16 Bit
Signed scale factor (exponent to the power of 10)
7
Type field / unit
16 Bit
Type field for register set in the upper Byte (value=0 for meter value
entry), the lower byte is the unit index (see above).
8 - 9
Time stamp
32 Bit
Unix time stamp transmitted by the meter, if there are no time stamps
transmitted by the meter, this value is set to 0
M-Bus to Modbus-TCP Gateway User Manual
SCM-1202-0096-EN 2.1