Instructions
Modbus TCP specification 19
Anybus M-Bus to Modbus-TCP Gateway User Manual Doc: HMSI-27-300, Rev: 1.10
4.2 Data format
The arrangement of data in the Modbus registers corresponds to the usual structure. It uses big endian
representation. For the 16 bit registers, the higher byte is sent first, then the lower byte.
Example:value: 0x1234 transmission order: 0x12, 0x34
If number and data ranges go beyond 16 bits, representation is similar. Again, the most significant 16 bit
register is sent first and is addressed with the lowest register address.
Example:value: 0x12345678 transmission order: 0x12, 0x34, 0x56, 0x78
The word order of 32 bit and 64 bit values can be changed within the system configuration file by setting
the parameter MODBUS_SWAP, see 7.4.1
System configuration file.
4.2.1 Dummy data
For checking the data layout on the Modbus master side the gateway can be configured to generate dum-
my data (see 3.1.4
Server tab). The following data will be represented via the Modbus interface according
to the register layout described in 5.2.4
Modbus register layout:
Address Value Description Decoded value
0 0x0002 Serial number of gateway, upper word 0x2993A
1 0x993A Serial number of gateway, lower word
2 0x0001 Version of the communication protocol 1
3 0x006F Firmware version of gateway 0x6F = 111: Version 1.11
4 0x519C Timestamp of gateway system time, upper word 0x519CC16D = 1369227629:
Wednesday, May 22nd 2013, 15:00:29 GMT+2
5 0xC16D Timestamp of gateway system time, lower word
6 0x0000 Empty field
7 0x0100 Type field of register set in upper byte 0x01: Gateway entry
8 0x0000 Empty field
9 0x0000 Empty field
10 0x00BC Serial No. of meter, upper word 0xBC614E = 12345678
11 0x614E Serial No. of meter, lower word
12 0x0443 3-letter manufacturer Code 0x0443: ABC
13 0x0102 Version (upper byte) and medium (lower byte) of the meter 0x0102: Version 1, medium 2 (electricity)
14 0x519C Timestamp of the meter, upper word 0x519CC164 = 1369227620:
Wednesday, May 22nd 2013, 15:00:20 GMT+2
15 0xC164 Timestamp of the meter, lower word
16 0x0000 Empty field
17 0x0200 Type field of register set in upper byte 0x02: Meter entry
18 0x0000 Empty field
19 0x0000 Empty field
20 0x0000 Meter value (integer), highest word 0xBC614E = 12345678
Calculation:
12345678 * 10^-4 = 1234.5678 Wh
21 0x0000 Meter value (integer)
22 0x00BC Meter value (integer)
23 0x614E Meter value (integer), lowest word
24 0x449A Meter value (float), upper word 0x449A522B = 1234.567800
25 0x522B Mater value (float), lower word
26 0xFFFC Scaling factor (exponent to base 10) 0xFFFC = -4: Factor = 10^-4
27 0x0005 Type field of register set in upper byte
and unit of value in lower byte
0x00: Meter value entry
0x05: Wh
28 0x519C Timestamp of meter value, upper word 0x519CBBB3 = 1369226163:
Wednesday, May 22nd 2013, 14:36:03 GMT+2
29 0xBBB3 Timestamp of meter value, lower word