Instructions

Anybus M-Bus to Modbus-TCP Gateway User Manual Doc: HMSI-27-300, Rev: 1.10
Chapter 4
4. Modbus TCP specification
The Modbus protocol was originally developed by the company Modicon (now Schneider Electric) for
the communication with their controllers. Data is transmitted in the terms of 16 Bit registers (integer
format) or as status information in terms of data bytes. Over the years, the protocol has been continu-
ously expanded. Modbus TCP is a variant of Modbus and part of the standard IEC 61158.
A full specification for Modbus can be found here: www.modbus.org
The Modbus protocol is a single master protocol. The master controls the entire communication and mon-
itors timeouts (no response from the addressed gateway). The connected gateways are only allowed to
respond to requests by the master.
The Anybus M-Bus to Modbus-TCP Gateway is a type of Modbus TCP server, a Modbus TCP slave.
Modbus TCP communication requires an established connection between a client (e.g. a PC or PLC)
and the gateway over a specified TCP port. The default port number is 502. See also 3.1.4
Server tab.
If a firewall is installed between the gateway and the client, make sure that the configured TCP port is
open in the firewall.
4.1 Function codes
The following Modbus function codes are supported by the gateway:
Function codes marked “Not used” are replied with ILLEGAL DATA ADDRESS (0x02); other un-
supported codes are replied with ILLEGAL FUNCTION (0x01).
If the function code 0x2B (Read Gateway Identification) is used with MEI=0x03, the gateway will re-
spond with identification data. The values 0x01 and 0x02 are supported as Gateway ID code, allowing
to retrieve basic and regular gateway identification data:
Code Name Description
0x01 Read Coil Not used
0x03 Read Holding Register Reading of meter data
0x05 Write Single Coil Not used
0x06 Write Single Register Not used
0x10 Write Multiple Register Not used
0x0F Force Multiple Coil Not used
0x2B Read Gateway Identification Reading of gateway data by MEI = 0x0E
Code Name Data type Example Type
0x00 VendorName String HMS Basic
0x01 ProductCode String 1036 Basic
0x02 MajorMinorRevision String 001 Basic
0x03 VendorUrl String www.anybus.com Regular
0x04 ProductName String Anybus M-Bus to Modbus-TCP Gateway Regular
0x05 ModelName String Standard Regular
0x06 UserApplicationName String Modbus TCP Gateway Regular