SUN2000MA V100R001C20 Modbus Interface Definitions
SUN2000MA V100R001C20 Modbus Interface Definitions
Issue 03
Date 2021-10-08
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: https://e.huawei.com
Change History
Contents
Change History............................................................................................................................ ii
1 Supported Models................................................................................................................... 1
1.1 Model Description................................................................................................................................................................... 1
2 Overview....................................................................................................................................7
2.1 Terms and Abbreviations...................................................................................................................................................... 7
3 Register Definitions.................................................................................................................9
4 Customized Interfaces.......................................................................................................... 24
4.1 Obtaining the System Information of Optimizers..................................................................................................... 24
4.2 Obtaining Real-time Data of Optimizers..................................................................................................................... 25
5 Interface Instructions........................................................................................................... 29
5.1 Alarm Information................................................................................................................................................................ 29
5.2 Power Grid Scheduling........................................................................................................................................................ 32
5.2.1 cosφ-P/Pn Characteristic Curve.................................................................................................................................... 32
5.2.2 Q-U Characteristic Curve................................................................................................................................................ 33
5.2.3 PF-U Characteristic Curve............................................................................................................................................... 34
5.3 Grid Codes............................................................................................................................................................................... 35
5.4 Energy Storage Specifications...........................................................................................................................................45
1 Supported Models
This chapter describes the solar inverter models that use the Modbus protocol and
the earliest firmware version. When a host needs to connect to these solar
inverters, ensure that the firmware version is correct.
1.1 Model Description
NOTE
The maximum active power (Pmax), maximum reactive power (Qmax), and rated power (Pn)
corresponding to each model can be obtained from the register interface. The model ID is
the unique code of the model.
2 Overview
Name Description
Name Description
s Second
3 Register Definitions
0x0308 Shutdown:
input underpower
0x0401 Grid
scheduling: cosφ-P
curve
0x0402 Grid
scheduling: Q-U curve
0x0403 Grid
scheduling: PF-U curve
0x0404 Grid
scheduling: dry
contact
0x0405 Grid
scheduling: Q-P curve
0x0500 Spot-check
ready
0x0501 Spot-checking
0x0600 Inspecting
0X0700 AFCI self
check
0X0800 I-V scanning
0X0900 DC input
detection
0X0A00 Running: off-
grid charging
0xA000 Standby: no
irradiation
NOTICE
Signals marked with * are supported only by certain models or standard codes.
4 Customized Interfaces
Data storage of the solar inverters: After the device search and positioning are
complete, the record is updated. The record format is as follows:
SN 2 -
Length 2 -
Reserved 4 -
Feature data of 78 -
optimizer 1
Feature data of 78 -
optimizer 2
... ... -
Feature data of 78 -
optimizer n
Status 2 0: offline
1: online
String number 2 -
SN 20 -
Software version 30 -
Alias 20 -
Synchronization process: uploads the files and synchronizes data according to the
time period; uploads the most recent data if there is no filter condition. For details,
see 6.3.7.1 Uploading Files.
Reserved 8 -
... - -
Reserved 4 -
Length 2 -
Number of optimizers 2 -
Real-time data of 26 -
optimizer 1
Real-time data of 26 -
optimizer 2
... - -
Temperature 2 Gain: 10
Unit: °C
5 Interface Instructions
NOTICE
The preceding table lists the alarm information about Huawei solar inverters.
Some alarms can be detected only after corresponding functional modules are
configured.
[1] AFCI functional unit
[2] Power collector or power meter connected to the solar inverters
[3] Detection of the external ports of the solar inverters that provide the 12 V
power supply
[4] This item can be detected when a built-in or external on-grid/off-grid
functional unit is configured.
[5] This item can be detected when optimizers are configured on the DC side.
[6] This item can be detected when the solar inverters are configured with PID
functional units.
[7] This item can be detected when energy storage units (ESUs) are configured.
[8] Some models have DC protection units.
NOTICE
In Italian standards, this curve may be used together with the Q-U characteristic
curve mode, Q-U dispatch trigger power (%), and Q-U power percentage to
exit scheduling parameters.
0 VDE-AR-N-4105 Germany
8 BDEW-MV Germany
9 G59-England UK
10 G59-Scotland UK
11 G83-England UK
12 G83-Scotland UK
13 CEI0-21 Italy
15 RD1699/661 Spain
16 RD1699/661-MV480 Spain
17 EN50438-NL Netherlands
18 C10/11 Belgium
19 AS4777 Australia
20 IEC61727 General
23 CEI0-16 Italy
24 CHINA-MV480 China
25 CHINA-MV China
26 TAI-PEA Thailand
27 TAI-MEA Thailand
28 BDEW-MV480 Germany
31 G59-England-MV480 UK
32 IEC61727-MV480 General
34 TAI-PEA-MV480 Thailand
35 TAI-MEA-MV480 Thailand
36 EN50438-DK-MV480 Denmark
39 EN50438-TR-MV480 Turkey
40 EN50438-TR Turkey
41 C11/C10-MV480 Belgium
42 Philippines Philippines
43 Philippines-MV480 Philippines
44 AS4777-MV480 Australia
49 IEC61727-60Hz General
50 IEC61727-60Hz-MV480 General
51 CHINA_MV500 China
52 ANRE Romania
53 ANRE-MV480 Romania
60 PO12.3-MV480 Spain
61 EN50438_IE-MV480 Ireland
62 EN50438_IE Ireland
68 IEC61727-50Hz-MV500 General
70 CEI0-16-MV480 Italy
71 PO12.3 Spain
74 CEI0-21-MV480 Italy
78 CHINA_MV800 China
87 EN50549-LV Ireland
88 EN50549-MV480 Ireland
89 Jordan-Transmission Jordan
90 Jordan-Transmission- Jordan
MV480
91 NAMIBIA Namibia
96 INDIA India
97 INDIA-MV500 India
98 ZAMBIA Zambia
99 ZAMBIA-MV480 Zambia
109 G59-England-MV800 UK
257 G98 UK
258 G99-TYPEA-LV UK
259 G99-TYPEB-LV UK
260 G99-TYPEB-HV UK
261 G99-TYPEB-HV-MV480 UK
262 G99-TYPEB-HV-MV800 UK
263 G99-TYPEC-HV-MV800 UK
264 G99-TYPED-MV800 UK
265 G99-TYPEA-HV UK
NOTICE
Table 5-5 Format description of parameters for fixed charging and discharging
periods
Description Data Type Gain Unit Value Range
6.2.1 Modbus-RTU
Figure 6-3 Modbus-RTU frame format
0 1–247 248–255
Reserved addresses are used for access control of the communication extension
modules. Huawei reserves the right to allocate the reserved addresses.
6.2.1.3 CRC
CRC applies to all bytes in front of the CRC code, which consists of 16 bits. The
reference code is as follows:
static unsigned char auchCRCHi[] = {
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0,
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01,
0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0,
0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01,
0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41,
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81,
0x40
};
/*CRC values for the low-order byte*/
static char auchCRCLo[] = {
0x00, 0xC0, 0xC1, 0x01, 0xC3, 0x03, 0x02, 0xC2, 0xC6, 0x06, 0x07, 0xC7, 0x05, 0xC5, 0xC4,
0x04, 0xCC, 0x0C, 0x0D, 0xCD, 0x0F, 0xCF, 0xCE, 0x0E, 0x0A, 0xCA, 0xCB, 0x0B, 0xC9, 0x09,
0x08, 0xC8, 0xD8, 0x18, 0x19, 0xD9, 0x1B, 0xDB, 0xDA, 0x1A, 0x1E, 0xDE, 0xDF, 0x1F, 0xDD,
0x1D, 0x1C, 0xDC, 0x14, 0xD4, 0xD5, 0x15, 0xD7, 0x17, 0x16, 0xD6, 0xD2, 0x12, 0x13, 0xD3,
0x11, 0xD1, 0xD0, 0x10, 0xF0, 0x30, 0x31, 0xF1, 0x33, 0xF3, 0xF2, 0x32, 0x36, 0xF6, 0xF7,
0x37, 0xF5, 0x35, 0x34, 0xF4, 0x3C, 0xFC, 0xFD, 0x3D, 0xFF, 0x3F, 0x3E, 0xFE, 0xFA, 0x3A,
0x3B, 0xFB, 0x39, 0xF9, 0xF8, 0x38, 0x28, 0xE8, 0xE9, 0x29, 0xEB, 0x2B, 0x2A, 0xEA, 0xEE,
0x2E, 0x2F, 0xEF, 0x2D, 0xED, 0xEC, 0x2C, 0xE4, 0x24, 0x25, 0xE5, 0x27, 0xE7, 0xE6, 0x26,
0x22, 0xE2, 0xE3, 0x23, 0xE1, 0x21, 0x20, 0xE0, 0xA0, 0x60, 0x61, 0xA1, 0x63, 0xA3, 0xA2,
0x62, 0x66, 0xA6, 0xA7, 0x67, 0xA5, 0x65, 0x64, 0xA4, 0x6C, 0xAC, 0xAD, 0x6D, 0xAF, 0x6F,
0x6E, 0xAE, 0xAA, 0x6A, 0x6B, 0xAB, 0x69, 0xA9, 0xA8, 0x68, 0x78, 0xB8, 0xB9, 0x79, 0xBB,
0x7B, 0x7A, 0xBA, 0xBE, 0x7E, 0x7F, 0xBF, 0x7D, 0xBD, 0xBC, 0x7C, 0xB4, 0x74, 0x75, 0xB5,
0x77, 0xB7, 0xB6, 0x76, 0x72, 0xB2, 0xB3, 0x73, 0xB1, 0x71, 0x70, 0xB0, 0x50, 0x90, 0x91,
0x51, 0x93, 0x53, 0x52, 0x92, 0x96, 0x56, 0x57, 0x97, 0x55, 0x95, 0x94, 0x54, 0x9C, 0x5C,
0x5D, 0x9D, 0x5F, 0x9F, 0x9E, 0x5E, 0x5A, 0x9A, 0x9B, 0x5B, 0x99, 0x59, 0x58, 0x98, 0x88,
0x48, 0x49, 0x89, 0x4B, 0x8B, 0x8A, 0x4A, 0x4E, 0x8E, 0x8F, 0x4F, 0x8D, 0x4D, 0x4C, 0x8C,
0x44, 0x84, 0x85, 0x45, 0x87, 0x47, 0x46, 0x86, 0x82, 0x42, 0x43, 0x83, 0x41, 0x81, 0x80, 0x40
};
unsigned short CRC16 ( puchMsg, usDataLen ) /* The function returns the CRC as a unsigned short type */
unsigned char *puchMsg ; /* message to calculate CRC upon */
unsigned short usDataLen ; /* quantity of bytes in message */
{
unsigned char uchCRCHi = 0xFF ; /* high byte of CRC initialized */
unsigned char uchCRCLo = 0xFF ; /* low byte of CRC initialized */
unsigned uIndex ; /* will index into CRC lookup table */
while (usDataLen--) /* pass through message buffer */
{
uIndex = uchCRCLo ^ *puchMsg++ ; /* calculate the CRC */
uchCRCLo = uchCRCHi ^ auchCRCHi[uIndex] ;
uchCRCHi = auchCRCLo[uIndex] ;
}
return (uchCRCHi << 8 | uchCRCLo) ;
}
Code source: MODBUS over Serial Line Specification and Implementation Guide
V1.02
6.2.2 Modbus-TCP
Figure 6-5 Modbus-TCP frame format
0x01 Illegal function The function code received in the query is not an
allowable action for the server (or slave node).
This may be because the function code is only
applicable to newer devices, and was not
implemented in the unit selected. It could also
indicate that the server (or slave node) is in the
wrong state to process a request of this type, for
example because it is not configured and is being
asked to return register values.
0x02 Illegal data The data address received in the query is not an
address allowable address for the server. More
specifically, the combination of reference number
and transfer length is invalid. For a controller
with 100 registers, the PDU addresses the first
register as 0, and the last one as 99. If a request
is submitted with a starting register address of
96 and a quantity of registers of 4, then this
request will successfully operate (address-wise at
least) on registers 96, 97, 98, 99. If a request is
submitted with a starting register address of 96
and a quantity of registers of 5, then this request
will fail with Exception Code 0x02 "Illegal Data
Address" since it attempts to operate on registers
96, 97, 98, 99 and 100, and there is no register
with address 100.
0x03 Illegal data The value contained in the query data field is not
value an allowable value for the server (or slave). The
value indicates a fault in the structure of the
remainder of a complex request, such as an
incorrectly implied length. It specifically does not
mean that a data item submitted for storage in a
register has a value outside the expectation of
the application program since the Modbus
protocol is unaware of the significance of any
particular value of any particular register.
0x06 Slave device The server cannot accept a Modbus request PDU.
busy A client application determines whether and
when to resend the request.
NOTE
6.3.3.4 Examples
This section takes the Modbus-TCP communications frames as an example. The
differences between Modbus-RTU and Modbus-TCP lie in the additional address
field and the CRC. Pay attention to the differences when using the Modbus-RTU
frames. This also works for the follow-up examples.
The master node sends a query request (register address: 32306/0X7E32) to the
slave node (logical device ID: 00).
01
Protocol type 00
00
Data length 00
06
Logical device ID 00
Function code 03
32
Number of 00
registers
02
01
Protocol type 00
00
Data length 00
07
Logical device ID 00
Function code 03
Register data 00
00
00
01
01
Protocol type 00
00
Data length 00
03
Logical device ID 00
Function code 83
6.3.4.4 Examples
A master node sends a command (register address: 40200/0X9D08) to a slave
node (address: 00).
01
Protocol type 00
00
Data length 00
06
Logical device ID 00
Function code 06
08
Register data 00
00
01
Protocol type 00
00
Data length 00
06
Logical device ID 00
Function code 06
08
Register data 00
00
01
Protocol type 00
00
Data length 00
03
Logical device ID 00
Function code 86
NOTE
6.3.5.4 Examples
The master node sets the register address 40118/0X9CB6 to 2 and the register
address 40119/0X9CB7 to 50 for the slave node (address: 00). The request frame
format is as follows.
01
Protocol type 00
00
Data length 00
0B
Logical device ID 00
Function code 10
B6
Number of 00
registers
02
Number of bytes 04
Register data 00
02
00
32
01
Protocol type 00
00
Data length 00
06
Logical device ID 00
Function code 10
B6
Number of 00
registers
02
01
Protocol type 00
00
Data length 00
03
Logical device ID 00
Function code 90
0x03–0x7F - - - Normal
0x80–0xFF - - - Expansion
ReadDevId code 1 01
Object ID 1 0x00
ReadDevId code 1 01
Consistency level 1 01
More 1 -
Next object ID 1 -
Number of objects 1 -
Object length 1 N
Object value N -
ReadDevId code 1 03
ReadDevId code 1 03
Consistency level 1 03
More 1 -
Next object ID 1 -
Number of objects 1 -
Object length 1 N
Object value N -
- - - -
4 ESN ASCII -
character
string
Table 6-15 PDU data field of the request frame for starting upload (0x05)
Function 1 0x41
code
Sub- 1 0x05
function
code
Data 1 1+N
length
Customi N -
zed data
Table 6-16 PDU data field of the response frame for starting upload (0x05)
Data Length Description
Field (Byte)
Function 1 0x41
code
Sub- 1 0x05
function
code
Data 1 6+N
length
File 4 -
length
Data 1 -
frame
length
Customi N -
zed data
Table 6-17 PDU data field in the abnormal response frame of the slave node
PDU Data Field Length Description
(Byte)
NOTE
If the exception code is 0x06, resend the request after 10 seconds. A request can be resent
for no more than six times.
Data length 1 3
File type 1 -
Frame data N -
Data length 1 1
File type 1 -
Data length 1 3
File type 1 -
File CRC 2 -
Table 6-23 Abnormal response frame for completing the data upload
Data Field Length Description
(Byte)