Single_Device_Control_via_Growatt_Modbus_TCP
Single_Device_Control_via_Growatt_Modbus_TCP
In order to meet the smart scheduling requirements from the regional grid companies, Growatt launches the new feature for
ShineWiFi-X datalogger. By using the newest software version, ShineWiFi-X could be used to support SCADA control based
on MODBUS TCP protocol for the third party. This paper will introduce the function in detail.
Modbus TCP and Modbus RTU are both Modbus protocols. Due to the different media (RS485 and LAN), there is a little
difference in the data format of the protocols.
Modbus RTU protocol data format:
Modbus TCP and Modbus RTU are both Modbus protocols, but the connection methods used are different. Except for
the difference in the data header and inspection method, the content format of the data read from the slave is the same.
03 is Holding Register()
04 is Input Register()
If a third-party platform wants to read the holding registers (0~19 address) of the No. 1 inverter, it needs to use the 03
command code.
The above is a case sent by the third-party platform to ShineWiFi-X, among which there are 7 bytes in MBAP, the
seventh byte 01 is the inverter address. The middle part is the Function Code, 03. And the Data area is based on
Growatt Modbus RTU protocol, the first two bytes 00 00 to indicate the start address of the register: the start address
is 0; and the last two bytes 00 14 are the number of addresses, which need to be converted into decimal, (the bytes
are hexadecimal), 00 14 converted to decimal is 20, which means there are 20 addresses.
If the third-party platform needs to read the input registers (0-19 address) of the No. 1 inverter, it needs to
use the 04 Function Code.
The above is a case sent by the third-party platform to ShineWiFi-X, among which there are 7 bytes in MBAP, the seventh
byte 01 is the inverter address. The middle part is the Function Code, 04. And the Data area is based on Growatt Modbus RTU
protocol, the first two bytes 00 00 to indicate the start address of the register: the start address is 0; And the last two bytes
00 14 are the number of addresses, which need to be converted into decimal, (the bytes are hexadecimal), 00 14 converted to
decimal is 20.
4. How does the third party system read the inverter register data through ShineWiFi-X
The third-party system reads the data of the inverter through ShineWiFi-X, which is to ask ShineWiFi-X to obtain the
data of a certain register of the inverter. ShineWiFi-X will read the data according to the register address required by the
third-party system and return the data to the third-party system. For the register table, please refer to the Growatt inverter
Modbus RTU protocol file.
The register table in Growatt inverter Modbus RTU protocol file is only applicable to Growatt's inverter as the file list
(2) Click "Advanced" to enter the advanced settings, select "Router settings", enter password "growatt+YYMMDDDD", such
as: "growatt20231121", you can switch the DHCP and modify the IP address, gateway address and subnet mask.
(3) Turn off DHCP, change the IP to 192.168.3.8, change the gateway address to 192.168.3.1, the subnet mask to
255.255.255.0 by default.
(4) Return to the "Configure the network" interface, fill in the WiFi name and password that the ShineWiFi-X needs to
connect to, and then click the "Configure immediately" button to configure the network.
(5) After network configuration success, you can use the Modbus TCP function according to the following steps.
The IP of the third-party platform is set to 192.168.3.7 (it should between 192.168.3.2 and 192.168.3.254 and can not use
the same IP as ShineWiFi-X)
Set the 03 section of the inverter 1, and set the address 1 of the register to 200 and read.
First check section 03 of inverter 1, the original value of register 1 is 1.
Modify the value of register 1 to 200
Modify successfully: