Technical Note Modbus Implementation Using 3gen DTU Pro V1.2
Technical Note Modbus Implementation Using 3gen DTU Pro V1.2
2 (December 2020)
Contents
Hoymiles DTU-Pro integrated with the RS485 and the Ethernet port allows Hoymiles
microinverter system to connect with a third-party monitoring platform. With this feature,
users can read module-level data directly and control the microinverter system remotely
by using the standard Modbus protocol which is convenient for users who want to process
the microinverter data on their own monitoring system. This function can be implemented
without affecting the communication between DTU-Pro and Hoymiles Monitoring System.
Also in some countries, generating plants should be equipped with a logic interface (input
port) in order to cease output active power or limit active power to a regulating level, which
can be implemented on this DTU by using Sunspec Modbus protocol.
There are two types of modbus protocol on the DTU-Pro, in which one is Hoymiles Modbus
protocol and another is Sunspec Modbus protocol. Hoymiles Modbus protocol is developed
by Hoymiles and implemented on two different types of interface, which is Modbus RTU on
RS485 port and Modbus TCP on Ethernet port. You can find the detailed information in
chapter 4 and chapter 5. Sunspec Modbus protocol is developed by Sunspec Alliance and
Hoymiles also adopted this protocol on the RS485 port. Please refer to chapter 6 for more
details about how to use this protocol.
2. Definitions
l Modbus: Modbus is a standard serial communications protocol, which often uses the
RS485 as its physical layer.
l Modbus RTU: Modbus over a serial RS485 connection.
l Modbus TCP: Modbus over an Ethernet connection.
l Sunspec Modbus: SunSpec Modbus is a standard serial communications protocol
designed to achieve interoperability between Distributed Energy Resource (DER)
components and smart grid applications.
l DTU: Hoymiles Data Transfer Unit, receive the data from microinverter and meter,
then upload them to the monitoring platform.
Hoymiles DTU-Pro implements Modbus protocol on two different types of interface, which
is Modbus RTU on RS485 port and Modbus TCP on Ethernet port. Users can use DTU-
Pro to communicate with the third-party device using the modbus protocol on these two
ports.
This Modbus output uses half-duplex two-wire (plus common) communication, so the same
pair of wires is used for sending and receiving.
l Be sure to connect the A, B and C (common) terminals. It is necessary to connect the
common terminal for reliable communication between the master device and the slave
devices on the network.
l Do not mix up different terminals, otherwise the communicaton between the devices
will be abnormal. Please refer to Chapter 3.3 for more details about the terminal
connection.
l If you use the shield cable, you can connect the shield layer to the Modbus common
terminal.
Please use twisted-pair cable (shielded cable is better) to prevent interference shown as
follows.
Microinverter
If there is more than one DTU involved in the installation, the RS485 port of DTU-Pro is
connected directly to the RS485 port of third party monitoring device in turn.
The picture below indicates the RS485 Port A and Port B on DTU. And the common (port
C) terminal is in the middle of the RS485 interface.
BA
l Scenario 1: If only one DTU installed on one system, when the RS485 cable length
is more than 200m, it will be suggested to use the shorting jumper on the first two ports
from DTU’s RS485 port.
l Scenario 2: When multiple DTU installed within one system, please connect the DTUs
one by one (as the diagram shows below). Shorting jumper for the last two RS485
ports from last DTU will be suggested if the distance between the third-party control
device and the last DTU is more than 200 meters.
Shorting Jumper
Users can also use the TCP Modbus protocol on the ethernet interface. Please use the
standard ethernet cable to connect the DTU to the network device, such as a router.
This section describes the register mapping for the monitoring data and remote control
using Hoymiles Modbus RTU protocol.
In this general Modbus protocol, the DTU-Pro will work as the slave and receive the control
from the third-party monitoring device. Every DTU-Pro on a Modbus network must have a
unique address and the correct baud rate.
The RS485 port on DTU-Pro can be configured to support Export Management, in which
DTU acts as a master, or Remote Control/Modbus Protocol, in which DTU acts as a slave.
All the DTUs under Hoymiles microinverter system should be set as the same type. The
default function of this RS485 port is set as Export Management. You can change the
function type from local APP by clicking “Installer APP”-“Me”-“Local Install Assistant”-
“Home”-“DTU Information”-“RS485 port setting” as below.
The RS485 port address needs to be set between 101~254. If there is more than one DTU
in a microinverter system, the port address needs to be set up differently.
The default baud rate of this RS485 port is set as 9600bps and cannot be changed.
The Modbus protocol is a protocol, with only one master and multiple slaves. If the DTU is
acting as a slave device, it will respond only when queried.
In most of the case, your Modbus software automatically uses the correct Modbus
command for any action you wish to perform, but the Hoymiles DTU-Pro only supports the
followings:
l 01(0x01) Read Single Device Status
DTU or microinverter status registers can be read and written, and are intended for
configuration values, so you can use functions 01 or 02 to read any registers.
The following registers provide a microinverter status register list, which can be both read
and written.
The following registers provide a microinverter data register list, which can be read-only
with the function code 0x03.
The following registers provide the device serial number register list, which can be read
and written.
The following registers provide DTU RS485 port setting, which can be read and written.
This section describes the register mapping for the monitoring data and remote control
using Hoymiles Modbus TCP protocol on the Ethernet interface.
In the Modbus TCP protocol, the DTU-Pro will work as the slave and receive the control
from the third-party monitoring device. Usually users can directly connect the ethernet
cable to the ethernet port to use Hoymiles Modbus protocol.
The default port number of Modbus TCP is 502 and can be changed according to the
protocol in this chapter. The IP address can be obtained in the network device, such as the
router.
The Modbus protocol is a protocol, with only one master and multiple slaves. If the DTU is
acting as a slave device, it will respond only when queried.
In most of the case, your Modbus software automatically uses the correct Modbus
command for any action you wish to perform, but the Hoymiles DTU-Pro only supports the
followings:
l 01(0x01) Read Single Device Status
DTU or microinverter status registers can be read and written, and are intended for
configuration values, so you can use functions 01 or 02 to read any registers.
The following registers provide a microinverter status register list, which can be both read
and written.
The following registers provide a microinverter data register list, which can be read-only
with the function code 0x03.
The following registers provide DTU ethernet setting register list, which can be read and
written.
Hoymiles DTU-Pro is compliant with Sunspec Modbus protocol. The Sunspec registers are
grouped as follows.
l Sunspec Common Registers (Model 1)
Note: The Sunspec Modbus functions are only supported with the software version V2.0
or above.
Note: The new Sunspec Modbus model 700 series will be supported in the near future.
In the Sunspec Modbus protocol, every microinverter can be controlled separately and the
DTU-Pro only works as a gateway. Therefore, every microinverter should be configured
with a RS485 address and the master will communicate with the microinverter by using
this address via the gateway DTU-Pro.
The RS485 port on DTU-Pro can be configured to support Export Management, in which
DTU acts as a master, or general Modbus terminal, in which DTU acts as a slave, or
Sunspec Modbus terminal, in which DTU-Pro also acts a slave. The RS485 addresses of
the microinverters must be set firstly if implementing the Sunspec Modbus protocol for
remote control.
First, please click “Plant List”-“Plant O&M”-“Sunspec Modbus Setting” as follows.
Note: RS485 addresses of all the microinverters should be within the range of 0~255
After click the button “Plant List”-“Plant O&M”-“Sunspec Modbus Setting” and download
the list of all the RS485 addresses with the serial numbers of the corresponding
microinverters and corresponding DTUs.
The default baud rate of this RS485 port is set as 9600bps and cannot be changed.
The Sunspec Modbus protocol is a protocol, with only one master and multiple slaves. If
the DTU is acting as a slave device, it will respond only when queried.
In most cases, your Sunspec Modbus software automatically uses the correct Sunspec
Unimplemented measurements or registers are indicated in the tables below with gray italic
text and marked as “unimplemented”. Unimplemented registers may still be read and will
return a special SunSpec value indicating that they are unimplemented.
● For floating-point registers the unimplemented value is 0x7FC00000 (NaN, not-a-
number).
● For 16-bit signed integer registers, the unimplemented value is 0x8000.
● For 16-bit unsigned registers, the unimplemented value is 0xFFFF.
● For 16-bit enumerate registers (enum16), the unimplemented value is 0xFFFF.
● For 32-bit signed registers, the unimplemented value is 0x80000000.
● For 32-bit unsigned registers, the unimplemented value is 0xFFFFFFFF.
● For 32-bit integer energy registers (acc32), the unimplemented (or unaccumulated)
value is 0x00000000. Because of this requirement, 32-bit integer energies in Model 101
always return at least 1, never 0.
● For 32-bit bit field registers (bitfield32), the unimplemented value is 0xFFFFFFFF.
● For string registers, the unimplemented value is 0x0000621.
● For sunssf signed registers, the unimplemented value is 0x8000.
The register common block is set to 40000 (Modbus protocol address [0-based]). All the
parameters, except for the Option resgister, are defined in the Sunspec common block as
follows.
This block contains the single-phase inverter registers in an integer format. The base
register of the Device Specific block is set to 40070 (Modbus protocol address [0-based]).
Unsupport values are not listed in the table below.
This block contains the single-phase inverter registers in a floating-point format for
maximum resolution. The base register of the Device Specific block is set to 40122
(Modbus protocol address [0-based]). Unsupport values are not listed in the table below.
The register common block is set to 40184 (Modbus protocol address [0-based]).