0% found this document useful (0 votes)
159 views

Technical Note Modbus Implementation Using 3gen DTU Pro V1.2

This document provides information about implementing Modbus communication with Hoymiles microinverters. It describes connecting over RS485 and Ethernet interfaces, the Modbus functions and registers, and implementing Sunspec Modbus protocol. The DTU-Pro unit allows connecting to third party monitoring systems using standard Modbus protocols for remote monitoring and control of microinverters.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
159 views

Technical Note Modbus Implementation Using 3gen DTU Pro V1.2

This document provides information about implementing Modbus communication with Hoymiles microinverters. It describes connecting over RS485 and Ethernet interfaces, the Modbus functions and registers, and implementing Sunspec Modbus protocol. The DTU-Pro unit allows connecting to third party monitoring systems using standard Modbus protocols for remote monitoring and control of microinverters.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Version 1.

2 (December 2020)
Contents

1. Brief Introduction of Modbus Implementation .............................................................................. 4


2. Definitions .................................................................................................................................................. 4
3. Connecting Modbus Outputs.............................................................................................................. 4
3.1 Connecting over RS485 Interface ................................................................................................ 5
3.1.1 RS485 Cable ........................................................................................................................ 5
3.1.2 Connection topology ......................................................................................................... 5
3.1.3 Connection Guideline ....................................................................................................... 6
3.2 Connecting over Ethernet Interface ............................................................................................ 6
4 Hoymiles Modus RTU Interface and Registers ................................................................................ 7
4.1 Configure Modbus RTU Settings ................................................................................................. 7
4.1.1 Setting the Modbus Address .......................................................................................... 7
4.1.2 Baud rate ............................................................................................................................... 8
4.2 Modbus RTU Functions ................................................................................................................... 8
4.2.1 Read Single Device Status............................................................................................. 8
4.2.2 Read Multiple Device Status.......................................................................................... 9
4.2.3 Read Device Data ............................................................................................................ 10
4.2.4 Write Single/All Device Status..................................................................................... 10
4.2.5 Write Multiple Device Status ........................................................................................ 11
4.3 Modbus Registers ........................................................................................................................... 12
4.3.1 Microinverter Status Register List .......................................................................... 12
4.3.2 Microinverter Data Register List ................................................................................. 13
4.3.3 Device SN Register List ................................................................................................. 15
4.3.4 DTU RS485 Port Setting ............................................................................................... 15
5 Hoymiles Modus TCP Interface and Registers .............................................................................. 15
5.1 Modbus TCP Settings .................................................................................................................... 16
5.2 Modbus TCP Functions ................................................................................................................. 16
5.2.1 Read Single Device Status........................................................................................... 16
5.2.2 Read Multiple Device Status........................................................................................ 17
5.2.3 Read Device Data ............................................................................................................ 18
5.2.4 Write Single/All Device Status..................................................................................... 19
5.2.5 Write Multiple Microinverters Status ......................................................................... 20
5.3 Modbus Registers ........................................................................................................................... 21
5.3.1 Microinverter Status Register List .......................................................................... 21
5.3.2 Microinverter Data Register List ................................................................................. 22
5.3.3 Device SN Register List ................................................................................................. 24
5.3.4 DTU Ethernet Setting Register List ........................................................................... 24
6 Sunspec Modus Interface and Registers.......................................................................................... 24
6.1 Configure Sunspec Modbus Settings ....................................................................................... 25
6.1.1 Setting the Modbus Address ........................................................................................ 25

2 Modbus Implementation Technical Note


6.1.2 Baud rate ............................................................................................................................. 26
6.2 Sunspec Modbus Functions ......................................................................................................... 26
6.2.1 Read Holding Registers ................................................................................................. 27
6.2.2 Write Single Register ...................................................................................................... 28
6.2.3 Write Multiple Registers ................................................................................................. 28
6.3 Unimplemented Sunspec Modbus Registers ......................................................................... 29
6.4 Sunspec Common Registers (Model 1).................................................................................... 30
6.5 Sunspec Single Phase Inverter (Model 101) ........................................................................... 30
6.6 Sunspec Single Phase Inverter (FLOAT) (Model 111) .......................................................... 31
6.7 Sunspec Immediate Controls (Model 123) ............................................................................. 31

3 Modbus Implementation Technical Note


1. Brief Introduction of Modbus Implementation

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.

3. Connecting Modbus Outputs

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.

4 Modbus Implementation Technical Note


3.1 Connecting over RS485 Interface

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.

3.1.1 RS485 Cable

Please use twisted-pair cable (shielded cable is better) to prevent interference shown as
follows.

3.1.2 Connection topology

RS485 networks should always be wired in a bus or daisy-chain configuration. That is to


say, the RS485 bus cable should start at the Master or some third-party monitoring device,
then connect to each Slave in turn.
If there is only one DTU used in the small size PV system, the RS485 port of DTU-Pro is
connected directly to the RS485 port of third party monitoring device using shielded twisted
pair. And you can also use the Ethernet or WiFi option to connect the DTU to Hoymiles
Monitoring Server at the same time.

Non-Hoymiles Monitoring Server


DTU-Pro
RS485

Microinverter

Hoymiles Monitoring Server


Ethernet or WiFi or GPRS

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.

5 Modbus Implementation Technical Note


Non-Hoymiles Monitoring Server
DTU-Pro RS485

Hoymiles Monitoring Server


Ethernet or WiFi or GPRS

3.1.3 Connection Guideline

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.

Non-Hoymiles Monitoring Server


Shorting Jumper

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.

Non-Hoymiles Monitoring Server

Shorting Jumper

3.2 Connecting over Ethernet Interface

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.

6 Modbus Implementation Technical Note


Usually DTU-Pro can only be used in the local area network and the IP can be found on
the webpage of the router. If users want to use DTU-Pro in the wide area, the network
mapping need to be performed on the router.

4 Hoymiles Modus RTU Interface and Registers

This section describes the register mapping for the monitoring data and remote control
using Hoymiles Modbus RTU protocol.

4.1 Configure Modbus RTU Settings

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.

4.1.1 Setting the Modbus Address

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.

7 Modbus Implementation Technical Note


4.1.2 Baud rate

The default baud rate of this RS485 port is set as 9600bps and cannot be changed.

4.2 Modbus RTU Functions

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.

l 02(0x02) Read Multiple 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.

l 03(0x03) Read Device Data


DTU or microinverter data registers are generally read-only and report voltage, current,
power, energy, and related values.

l 05(0x05) Write Single/All Device Status


This writes a new value to a single or all DTU or microinverter status registers.

l 15(0x0F) Write Multiple Device Status


This writes a new value to multiple DTU or microinverter status registers. Please refer to
the next section for more details.

4.2.1 Read Single Device Status

ü Command sending format

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x01
Register Address 2 Big-Endian
Register Count 2 0x0001 Big-Endian
CRC 2 CRC16

ü Command response format (if success)

8 Modbus Implementation Technical Note


Name Length Value Remark
Address 1 RS485 Address
Function Code 1 0x01
Data Length 2 0x02
Data 2 Big-Endian
CRC 2 CRC16

ü Command response format (if failed)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x81
Wrong Data Code 1 0x01
CRC 2 CRC16

4.2.2 Read Multiple Device Status

ü Command sending format

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x02
Register Address 2 Big-Endian
Register Count 2 Big-Endian
CRC 2 CRC16

ü Command response format (if success)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x02
Data Length 2
Data 1 2 Big-Endian
Data 2 2 Big-Endian
……
CRC 2 CRC16

ü Command response format (if failed)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x82

9 Modbus Implementation Technical Note


Wrong Data Code 1 0x01
CRC 2 CRC16

4.2.3 Read Device Data

ü Command sending format

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x03
Register Address 2 Big-Endian
Register Count 2 Big-Endian
CRC 2 CRC16

ü Command response format (if success)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x03
Data Length 2
Data 1 2 Big-Endian
Data 2 2 Big-Endian
……
CRC 2 CRC16

ü Command response format (if failed)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x83
Wrong Data Code 1 0x01
CRC 2 CRC16

4.2.4 Write Single/All Device Status

ü Command sending format

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x05
Register Address 2 Big-Endian
Data 2 Big-Endian
CRC 2 CRC16

10 Modbus Implementation Technical Note


ü Command response format (if success)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x05
Register Address 2 Big-Endian
Data 2 Big-Endian
CRC 2 CRC16

ü Command response format (if failed)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x85
Wrong Data Code 1 0x01
CRC 2 CRC16

4.2.5 Write Multiple Device Status

ü Command sending format

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x0F
Register Address 2 Big-Endian
Register Count 2 Big-Endian
Data Length 1
Data 1 1
Data 2 1
……
CRC 2 CRC16

ü Command response format (if success)

Name Length Value Remark


Address 1 RS485 Address
Function Code 1 0x0F
Register Address 2
Register Count 2 Big-Endian
CRC 2 CRC16

ü Command response format (if failed)

11 Modbus Implementation Technical Note


Name Length Value Remark
Address 1 RS485 Address
Function Code 1 0x8F
Wrong Data Code 1 0x01
CRC 2 CRC16

4.3 Modbus Registers

4.3.1 Microinverter Status Register List

The following registers provide a microinverter status register list, which can be both read
and written.

R/W? Function Code


Registers Name Remark
(Supported)
Turn ON/OFF W 0: OFF
0xC000 0x05
(All Microinverters) 1: ON
W Percentage
2~100 for HM
Limit Active Power
0xC001 0x05 series
(All Microinverters)
10~100 for MI
series
0xC002 Reserved W 0x05
0xC003 Reserved W 0x05
0xC004 Reserved W 0x05
0xC005 Reserved W 0x05
Turn ON/OFF R/W 0: OFF
0xC006 0x01\0x02\0x05\0x0F
(Port 1) 1: ON
R/W Percentage
2~100 for HM
Limit Active Power
0xC007 0x01\0x02\0x05\0x0F series
(Port 1)
10~100 for MI
series
0xC008 Reserved R/W 0x01\0x02\0x05\0x0F
0xC009 Reserved R/W 0x01\0x02\0x05\0x0F
0xC00A Reserved R/W 0x01\0x02\0x05\0x0F
0xC00B Reserved R/W 0x01\0x02\0x05\0x0F
Turn ON/OFF R/W 0: OFF
0xC00C 0x01\0x02\0x05\0x0F
(Port 2) 1: ON
Limit Active Power R/W
0xC00D 0x01\0x02\0x05\0x0F Percentage
(Port 2)

12 Modbus Implementation Technical Note


2~100 for HM
series
10~100 for MI
series
0xC00E Reserved R/W 0x01\0x02\0x05\0x0F
0xC00F Reserved R/W 0x01\0x02\0x05\0x0F
0xC000 Reserved R/W 0x01\0x02\0x05\0x0F
0xC001 Reserved R/W 0x01\0x02\0x05\0x0F
Turn ON/OFF R/W 0: OFF
0xC002 0x01\0x02\0x05\0x0F
(Port 3) 1: ON
R/W Percentage
2~100 for HM
Limit Active Power
0xC003 0x01\0x02\0x05\0x0F series
(Port 3)
10~100 for MI
series
0xC004 Reserved R/W 0x01\0x02\0x05\0x0F
0xC005 Reserved R/W 0x01\0x02\0x05\0x0F
0xC006 Reserved R/W 0x01\0x02\0x05\0x0F
0xC007 Reserved R/W 0x01\0x02\0x05\0x0F
……
(Maximum 99 ports)
Turn ON/OFF W 0: OFF
0x9D9C 0x05
(All Microinverters) 1: ON
W Percentage
2~100 for HM
Limit Active Power
0x9D9D 0x05 series
(All Microinverters)
10~100 for MI
series
0x9D9E Reserved W 0x05
0x9D9F Reserved W 0x05
0x9DA0 Reserved W 0x05
0x9DA1 Reserved W 0x05
Note:
1. 4 ports for 4 in 1 microinverters, 2 ports for 2 in 1 microinverter and 1 port for 1 in 1
microinverter.
2. For 4 in 1 and 2 in 1 microinverters, control on all ports in one microinverter should be
same.

4.3.2 Microinverter Data Register List

The following registers provide a microinverter data register list, which can be read-only
with the function code 0x03.

Registers Name Decimal Units Remark

13 Modbus Implementation Technical Note


0x1000 Data Type / / Default, 0x3C
0x1001
12-digit decimal
0x1002
number
0x1003 Microinverter
/ / Big-Endian
0x1004 SN
For example,
0x1005
116151200012
0x1006
0x1007 Port Number / /
0x1008
PV Voltage 1 V
0x1009
0x100A 1 for MI Series,
PV Current 1/2 A
0x100B 2 for HM Series
0x100C
Grid Voltage 1 V
0x100D
0x100E
Grid frequency 2 Hz
0x100F
0x1010
PV Power 1 W
0x1011
0x1012 Today
/ Wh
0x1013 Production
0x1014
0x1015
Total Production / Wh
0x1016
0x1017
0x1018 Microinverter internal
Temperature 1 ℃
0x1019 temperature
0x101A Operating
/ /
0x101B Status
0x101C
Alarm Code / /
0x101D
0x101E
Alarm Count / /
0x101F
Communication status
0x1020 Link Status / /
with DTU
0x1021 / / / Fixed, 0x07
0x1022 Reserved / /
0x1023 Reserved / /
0x1024 Reserved / /
0x1025 Reserved / /
0x1026 Reserved / /
0x1027 Reserved / /
0x1028 Data Type / / Default, 0x3C
0x1029 / /

14 Modbus Implementation Technical Note


0x102A
12-digit decimal
0x102B
Microinverter number
0x102C
SN For example,
0x102D
116151200012
0x102E
0x102F Port Number / /
0x1030
PV Voltage 1 V
0x1031
0x1032 1 for MI Series,
PV Current 1/2 A
0x1033 2 for HM Series
0x1034
Grid Voltage 1 V
0x1035
0x1036
Grid frequency 2 Hz
0x1037
0x1038
PV Power 1 W
0x1039
0x103A Today
/ Wh
0x103B Production
0x103C
0x103D
Total Production / Wh
0x103E
0x103F
0x1040 Microinverter internal
Temperature 1 ℃
0x1041 temperature
0x1042 Operating
/ /
0x1043 Status
0x1044
Alarm Code / /
0x1045
0x1046
Alarm Count / /
0x1047
Communication status
0x1048 Link Status / /
with DTU
0x1049 / / / Fixed, 0x07
0x104A Reserved / /
0x104B Reserved / /
0x104C Reserved / /
0x104D Reserved / /
0x104E Reserved / /
0x104F Reserved / /
………….
(Maximum 99 ports)

15 Modbus Implementation Technical Note


4.3.3 Device SN Register List

The following registers provide the device serial number register list, which can be read
and written.

R/W? Function Code


Registers Name Decimal Units Remark
(Supported)
0x2000 R 0x03
0x2001
0x2002
DTU SN
0x2003
0x2004 / /
0x2005
0x2056 R/W 0x03/0x0F
0x2057
0x2058 Microinverter
/ / 116151200012
0x2059 SN
0x205A
0x205B
0x205C R/W 0x03/0x0F
0x205D
0x205E Microinverter
/ / 116151200012
0x205F SN
0x2060
0x2061
……
(Maximum 99 ports for one DTU)
Note:
1. 4 ports for 4 in 1 microinverters, 2 ports for 2 in 1 microinverter and 1 port for 1 in 1
microinverter.

4.3.4 DTU RS485 Port Setting

The following registers provide DTU RS485 port setting, which can be read and written.

R/W? Function Code


Registers Name Decimal Units Remark
(Supported)
0: Export
RS485 Management
0x2503 / / R/W 0x03/0x0F
Function 1: Hoymiles
Modbus
RS485 Port
0x2504 / / R/W 0x03/0x0F
Address
Note: When the port number is changed, please restart the DTU.

16 Modbus Implementation Technical Note


5 Hoymiles Modus TCP Interface and Registers

This section describes the register mapping for the monitoring data and remote control
using Hoymiles Modbus TCP protocol on the Ethernet interface.

5.1 Modbus TCP Settings

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.

5.2 Modbus TCP Functions

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.

l 02(0x02) Read Multiple 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.

l 03(0x03) Read Device Data


DTU or microinverter data registers are generally read-only and report voltage, current,
power, energy, and related values.

l 05(0x05) Write Single/All Device Status


This writes a new value to a single or all DTU or microinverter status registers.

l 15(0x0F) Write Multiple Device Status


This writes a new value to multiple DTU or microinverter status registers. Please refer to
the next section for more details.

17 Modbus Implementation Technical Note


5.2.1 Read Single Device Status

ü Command sending format

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x01
Starting Address 2 Big-Endian
No. of Registers 2 0x0001 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x01
Data length 1 0x02
Data 2 Big-Endian

ü Command response format (if failed)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x81
Error Data Code 1 0x01

5.2.2 Read Multiple Device Status

ü Command sending format

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1

18 Modbus Implementation Technical Note


Modbus Data Function Code 1 0x02
Starting Address 2 Big-Endian
No. of Registers 2 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x02
Data length 1
Data 1 2 Big-Endian
Data 2 2 Big-Endian
……

ü Command response format (if failed)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x82
Error Data Code 1 0x01

5.2.3 Read Device Data

ü Command sending format

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x03
Address Code 2 Big-Endian
No. of Registers 2 Big-Endian

ü Command response format (if success)

Name Length Value Remark

19 Modbus Implementation Technical Note


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x03
Data length 1
Data 1 2 Big-Endian
Data 2 2 Big-Endian
……

ü Command response format (if failed)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x83
Error Data Code 1 0x01

5.2.4 Write Single/All Device Status

ü Command sending format

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x05
Address Code 2 Big-Endian
No. of Registers 2 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x05
Address Code 2 Big-Endian
Data 2 Big-Endian

20 Modbus Implementation Technical Note


ü Command response format (if failed)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x85
Error Data Code 1 0x01

5.2.5 Write Multiple Microinverters Status

ü Command sending format

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x0F
Address Code 2 Big-Endian
No. of Registers 2 Big-Endian
Data length 1
Data 1 1
Data 2 1
……

ü Command response format (if success)

Name Length Value Remark


Header Transaction ID 2 Big-Endian
Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x0F
Address Code 2 Big-Endian
No. of Registers 2 Big-Endian

ü Command response format (if failed)

Name Length Value Remark


Header Transaction ID 2 Big-Endian

21 Modbus Implementation Technical Note


Protocol ID 2 Big-Endian
Length 2 Big-Endian
Unit ID 1
Modbus Data Function Code 1 0x8F
Error Data Code 1 0x01

5.3 Modbus Registers

5.3.1 Microinverter Status Register List

The following registers provide a microinverter status register list, which can be both read
and written.

R/W? Function Code


Registers Name Remark
(Supported)
Turn ON/OFF W 0: OFF
0xC000 0x05
(All Microinverters) 1: ON
W Percentage
2~100 for HM
Limit Active Power
0xC001 0x05 series
(All Microinverters)
10~100 for MI
series
0xC002 Reserved W 0x05
0xC003 Reserved W 0x05
0xC004 Reserved W 0x05
0xC005 Reserved W 0x05
Turn ON/OFF R/W 0: OFF
0xC006 0x01\0x02\0x05\0x0F
(Port 1) 1: ON
R/W Percentage
2~100 for HM
Limit Active Power
0xC007 0x01\0x02\0x05\0x0F series
(Port 1)
10~100 for MI
series
0xC008 Reserved R/W 0x01\0x02\0x05\0x0F
0xC009 Reserved R/W 0x01\0x02\0x05\0x0F
0xC00A Reserved R/W 0x01\0x02\0x05\0x0F
0xC00B Reserved R/W 0x01\0x02\0x05\0x0F
Turn ON/OFF R/W 0: OFF
0xC00C 0x01\0x02\0x05\0x0F
(Port 2) 1: ON
R/W Percentage
Limit Active Power
0xC00D 0x01\0x02\0x05\0x0F 2~100 for HM
(Port 2)
series

22 Modbus Implementation Technical Note


10~100 for MI
series
0xC00E Reserved R/W 0x01\0x02\0x05\0x0F
0xC00F Reserved R/W 0x01\0x02\0x05\0x0F
0xC000 Reserved R/W 0x01\0x02\0x05\0x0F
0xC001 Reserved R/W 0x01\0x02\0x05\0x0F
Turn ON/OFF R/W 0: OFF
0xC002 0x01\0x02\0x05\0x0F
(Port 3) 1: ON
R/W Percentage
2~100 for HM
Limit Active Power
0xC003 0x01\0x02\0x05\0x0F series
(Port 3)
10~100 for MI
series
0xC004 Reserved R/W 0x01\0x02\0x05\0x0F
0xC005 Reserved R/W 0x01\0x02\0x05\0x0F
0xC006 Reserved R/W 0x01\0x02\0x05\0x0F
0xC007 Reserved R/W 0x01\0x02\0x05\0x0F
……
(Maximum 99 ports)
Turn ON/OFF W 0: OFF
0x9D9C 0x05
(All Microinverters) 1: ON
W Percentage
2~100 for HM
Limit Active Power
0x9D9D 0x05 series
(All Microinverters)
10~100 for MI
series
0x9D9E Reserved W 0x05
0x9D9F Reserved W 0x05
0x9DA0 Reserved W 0x05
0x9DA1 Reserved W 0x05
Note:
1. 4 ports for 4 in 1 microinverters, 2 ports for 2 in 1 microinverter and 1 port for 1 in 1
microinverter.
2. For 4 in 1 and 2 in 1 microinverters, control on all ports in one microinverter should be
same.

5.3.2 Microinverter Data Register List

The following registers provide a microinverter data register list, which can be read-only
with the function code 0x03.

Registers Name Decimal Units Remark


0x1000 Data Type / / Default, 0x3C
0x1001 / /

23 Modbus Implementation Technical Note


0x1002 12-digit decimal
0x1003 number
Microinverter
0x1004 Big-Endian
SN
0x1005 For example,
0x1006 116151200012
0x1007 Port Number / /
0x1008
PV Voltage 1 V
0x1009
0x100A 1 for MI Series,
PV Current 1/2 A
0x100B 2 for HM Series
0x100C
Grid Voltage 1 V
0x100D
0x100E
Grid frequency 2 Hz
0x100F
0x1010
PV Power 1 W
0x1011
0x1012 Today
/ Wh
0x1013 Production
0x1014
0x1015
Total Production / Wh
0x1016
0x1017
0x1018 Microinverter internal
Temperature 1 ℃
0x1019 temperature
0x101A Operating
/ /
0x101B Status
0x101C
Alarm Code / /
0x101D
0x101E
Alarm Count / /
0x101F
Communication status
0x1020 Link Status / /
with DTU
0x1021 / / / Fixed, 0x07
0x1022 Reserved / /
0x1023 Reserved / /
0x1024 Reserved / /
0x1025 Reserved / /
0x1026 Reserved / /
0x1027 Reserved / /
0x1028 Data Type / / Default, 0x3C
0x1029
Microinverter 12-digit decimal
0x102A / /
SN number
0x102B

24 Modbus Implementation Technical Note


0x102C For example,
0x102D 116151200012
0x102E
0x102F Port Number / /
0x1030
PV Voltage 1 V
0x1031
0x1032 1 for MI Series,
PV Current 1/2 A
0x1033 2 for HM Series
0x1034
Grid Voltage 1 V
0x1035
0x1036
Grid frequency 2 Hz
0x1037
0x1038
PV Power 1 W
0x1039
0x103A Today
/ Wh
0x103B Production
0x103C
0x103D
Total Production / Wh
0x103E
0x103F
0x1040 Microinverter internal
Temperature 1 ℃
0x1041 temperature
0x1042 Operating
/ /
0x1043 Status
0x1044
Alarm Code / /
0x1045
0x1046
Alarm Count / /
0x1047
Communication status
0x1048 Link Status / /
with DTU
0x1049 / / / Fixed, 0x07
0x104A Reserved / /
0x104B Reserved / /
0x104C Reserved / /
0x104D Reserved / /
0x104E Reserved / /
0x104F Reserved / /
………….
(Maximum 99 ports)

5.3.3 Device SN Register List

25 Modbus Implementation Technical Note


The following registers provide the device serial number register list, which can be read
and written.

R/W? Function Code


Registers Name Decimal Units Remark
(Supported)
0x2000 R 0x03
0x2001
0x2002
DTU SN
0x2003
0x2004 / /
0x2005
0x2056 R/W 0x03/0x0F
0x2057
0x2058 Microinverter
/ /
0x2059 SN
0x205A
0x205B
0x205C R/W 0x03/0x0F
0x205D
0x205E Microinverter
/ /
0x205F SN
0x2060
0x2061
……
(Maximum 99 ports for one DTU)
Note:
1. 4 ports for 4 in 1 microinverters, 2 ports for 2 in 1 microinverter and 1 port for 1 in 1
microinverter.

5.3.4 DTU Ethernet Setting Register List

The following registers provide DTU ethernet setting register list, which can be read and
written.

R/W? Function Code


Registers Name Decimal Units Remark
(Supported)
0x2501 Ethernet R/W 0x03/0x0F
/ / Default: 502
0x2502 Port Number
Note: When the port number is changed, please restart the DTU.

26 Modbus Implementation Technical Note


6 Sunspec Modus Interface and Registers

Hoymiles DTU-Pro is compliant with Sunspec Modbus protocol. The Sunspec registers are
grouped as follows.
l Sunspec Common Registers (Model 1)

l Sunspec Single Phase Inverter (Model 101)

l Sunspec Single Phase Inverter (FLOAT) (Model 111)

l Sunspec Immediate Controls (Model 123)


The DTU-Pro includes both the general Modbus protocol as explained in the previous
chapter and the Sunspec Modbus protocol. The functions and registers as mentioned in
the general Modbus protocol are different from those in the Sunspec Modbus protocol. But
you can still use these two protocols if you want.
The following section will describe the funtions and the register mapping for the Sunspec
Modbus protocol.

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.

6.1 Configure Sunspec Modbus Settings

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.

6.1.1 Setting the Modbus Address

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.

27 Modbus Implementation Technical Note


Usually there are multiple microinverters in one PV station, and all the address should be
given. For convenience, after the installer completing PV station creation, only the RS485
start address need to be set for all the microinverters.

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.

6.1.2 Baud rate

The default baud rate of this RS485 port is set as 9600bps and cannot be changed.

6.2 Sunspec Modbus Functions

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

28 Modbus Implementation Technical Note


Modbus command for any action you wish to perform, but the Hoymiles DTU-Pro only
supports the followings:
l 03(0x03) Read Holding Registers
Holding registers can be read to be intended for confirming the configured values.

l 06(0x06) Write Single Register


This writes a new value to a single register.

l 16(0x10) Write Multiple Registers


This writes a new value to multiple registers. Please refer to the next section for more
details.

6.2.1 Read Holding Registers

ü Command sending format

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x03
Register Address 2 Bytes 0x0000-0xFFFF Big-Endian
Register Count 2 Bytes 0x0000-0xFFFF Big-Endian
CRC 2 Bytes CRC16 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x03
Data Length 2 Bytes 2*N Big-Endian
Data 2* N Bytes value Big-Endian
CRC 2 Bytes CRC16 Big-Endian

ü Command response format (if failed)

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x83
Wrong Data Code 1 Bytes 0x01/0x02/0x03/0x04
CRC 2 Bytes CRC16 Big-Endian

29 Modbus Implementation Technical Note


6.2.2 Write Single Register

ü Command sending format

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x06
Register Address 2 Bytes 0x0000-0xFFFF Big-Endian
Data 2 Bytes 0x0000-0xFFFF Big-Endian
CRC 2 Bytes CRC16 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x06
Register Address 2 Bytes 0x0000-0xFFFF Big-Endian
Data 2 Bytes 0x0000-0xFFFF Big-Endian
CRC 2 Bytes CRC16 Big-Endian

ü Command response format (if failed)

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x86
Wrong Data Code 1 Bytes 0x01/0x02/0x03/0x04
CRC 2 Bytes CRC16 Big-Endian

6.2.3 Write Multiple Registers

ü Command sending format

Name Length Value Remark


Address 2 Bytes 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 Bytes 0x10
Register Address 2 Bytes 0x0000-0xFFFF Big-Endian
Register Count 2 Bytes 0x0000-0xFFFF Big-Endian
Data Length 1 Bytes 2*N Big-Endian
Data 2*N Bytes value Big-Endian

30 Modbus Implementation Technical Note


CRC 2 Bytes CRC16 Big-Endian

ü Command response format (if success)

Name Length Value Remark


Address 2 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 0x10
Register Address 2 Bytes 0x0000-0xFFFF Big-Endian
Register Count 2 0x0000-0xFFFF Big-Endian
CRC 2 CRC16 Big-Endian

ü Command response format (if failed)

Name Length Value Remark


Address 2 0x0001-0xFFFF Microinverter
RS485 Address
Function Code 1 0x90
Wrong Data Code 1 0x01/0x02/0x03/0x04
CRC 2 CRC16 Big-Endian

6.3 Unimplemented Sunspec Modbus Registers

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.

31 Modbus Implementation Technical Note


6.4 Sunspec Common Registers (Model 1)

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.

Registers Size Name Type Description


‘SunS’ (SunSpec) identifier, value =
40000 2 SunS uint32
"SunS" (0x53756e53)
40002 1 ID uint16 Common model ID, value =0x0001
SunSpec model register count (length),
40003 1 L uint16
value =66
40004 16 Manufacturer (Mn) String(32) Manufacturer string, value=”Hoymiles”
40020 16 Model (Md) String(32) Microinverter model string
40044 8 Version (Vr) String(16) Microinverter version string
40052 16 Serial Number (SN) String(32) Microinverter serial number string
40068 1 Device Address (DA) uint16 Microinverter Modbus address
40069 1 Pad uint16 Value=0x8000

6.5 Sunspec Single Phase Inverter (Model 101)

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.

Registers Size Name Type Description


101=single phase, 102=split phase,
40070 1 ID uint16
103=three phase
40071 1 L uint16 Length of model block, value=50
40072 1 A uint16 AC total current value
AC Phase A current value, connected
40073 1 AphA uint16
phase
40076 1 A_SF sunssf AC voltage scale factor, value=-2
40080 1 PhVphA uint16 AC Voltage Phase A to N value
40083 1 V_SF sunssf AC voltage scale factor, value=-1
40084 1 W int16 AC power value
40085 1 W_SF sunssf AC power scale factor, value=-1
40086 1 Hz int16 AC frequency value
40087 1 Hz_SF sunssf AC frequency scale factor, value=-2
40090 1 VAr int16 AC reactive power
40091 1 VAr_SF sunssf AC reactive power scale factor, value=-1

32 Modbus Implementation Technical Note


40092 1 PF int16 AC power factor
40093 1 PF_SF sunssf AC power factor scale factor, value=-2
40094 1 WH acc32 AC lifetime energy
40096 1 WH_SF sunssf AC lifetime energy scale factor, value=0

6.6 Sunspec Single Phase Inverter (FLOAT) (Model 111)

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.

Registers Size Name Type Description


111=single phase, 112=split phase,
40122 1 ID uint16
113=three phase
40123 1 L uint16 Length of model block, value=50
40124 2 A float32 AC total current value
AC Phase A current value, connected
40126 2 AphA float32
phase
40138 2 PhVphA float32 AC Voltage Phase A to N value
40144 2 W float32 AC power value
40146 2 Hz float32 AC frequency value
40150 2 VAr float32 AC reactive power
40152 2 PF float32 AC power factor
40154 2 WH float32 AC lifetime energy

6.7 Sunspec Immediate Controls (Model 123)

The register common block is set to 40184 (Modbus protocol address [0-based]).

Registers Size Name Type Description


40184 1 ID uint16 Immediate Inverter Controls
40185 1 L uint16 Model Length
40189 1 WMaxLimPct uint16 Set power output to specified level
Enumerated valued. Throttle
enable/disable control.
40193 1 WMaxLim_Ena enum16
0=Disbaled
1=Enabled

33 Modbus Implementation Technical Note

You might also like