I want to read data from my single phase solaredge wave inverter. I want to use Modbus RTU, this is already connected and the baud rate has been changed to 9600, slave ID 02, the inverter should be the slave and the arduino the master. I will read data from the inverter with Arduino uno with ethernet shield and RS485 interface MAXX. I was able to read some power meters and a growatt 3 phase inverter. I used the basic arduino language without a modbus library. Basically With the following lines
Serial.write(request, REQ_NO_BYTES)
n = Serial.readBytes(response, RESP_NO_BYTES)
the response is read processed and transfered to a MariaDB database (LAMPP). this all works fine since september 2024. All data is stored every 5 minutes. The request in all cases have the same structure:
1e byte slave ID
2e byte function code 04 read input register
3e byte HI address
4e byte LO address
5e byte HI no. of registers
6e byte LO no. of registers
7e byte LO CRC-16 Modbus
8e byte HI CRC-16 Modbus
The setup of the solaredge unfortunately is different, at least how I understood this.
1e field Client identifier XXXX. ?? No idea what this is.
2e field one byte Length of the following fields, 6 bytes
3e field one byte slave ID
4e function one byte code 03
5e-8e address of starting point 4 bytes.
If I want to read the AC power for instance which is stored in HI address 40083 hex 9C 93
the request would be something like { ???? 0x06 0x02 0x03 0x00 0x00 0x9C 0x93 0x?? 0x?? }
the last 2 bytes are for the CRC-16 modbus, but can only be determined when the full request is known. This is easy to determine.
The simple question is what full request (hex) do I need to send to the inverter?
The manual is a little confusing, however the Modbus command you need is Read Holding Register (0x03). The Modbus slave (aka server) address is 0x01.
To get the register address, take the 1-based decimal address (40084), remove the first digit, then subtract 1, then convert to hex. Therefore the Modbus register address is 0x00 0x53.
Hi bobcousins, thnx for the response. I tested this and the result is
02 03 02 4E 6E 48 08, I assume the value is 02 4E 6E according to me this is 151150 is that correct? The current output power is 1.9 Kw.
It took me hours testing without any result. Thanks very much I will program the solaredge from now on.