Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Modbus communication with Epever solar charge controller over RS485


adallo Feb 17, 2023 02:41 PM

Hi,
I have a CR6 on which I am trying to read data from a solar charge controller TracerAN from Epever. The solar charge
controller uses a RS485 output that I connected to ComC1 on the CR6. Specifically, I connected RS485-B to C1 and
RS485-A to C2. Can you confirm this is correct?
The Epever solar charger talks over Modbus RTU. The communication parameters are:
- The default controller ID number is "1";
- Serial communication parameters: baud rate 115200, data bits 8, stop bits 1, no data flow control;
- Register address uses hexadecimal format, the base address offset is 0x00.
- All 32 bit length data uses two 16 bit registers to represent (L and H respectively), for example, the value of the array rated
power is 3000, data multiple is 100, the data of L register (address 0x3002) is 0x93E0 and the data of H register (address
0x3003) is 0x0004. This last point is copy-pasted from Epever documentation.

Basically, I am trying to use the ModbusMaster() function to try retrieve values from the Epever. I do not manage.

For example, on the Epever documentation they specify that to retrieve the Battery Voltage one should use:
Address: 331A, Function 04
The address is in HEX, but the ModbusMaster function takes decimals in, so I converted and used 13082.

I have tried:

Public Epever_data
Public Epever_result

ModbusMaster(Epever_result,ComC1,115200,1,4,Epever_data,13082,1,3,100,0)

Start variable I used the address found in Epever manual: 331A (HEX) = 13082 (dec)
Length variable should be set automatically since I have specified ModbusOption = 0, so 32-bit default.
Maybe this is wrong?
Maybe the Start variable in the function should not be 13082?

Could anyone help?

Thanks
Alberto


leoramos Aug 24, 2023 02:48 PM

Could you make it work?
I am trying the same think in a CR1000 with RS485 converter and not worked yet.


dennisstauffer Aug 25, 2023 09:22 AM

Hello,

I think there is an issue with the length variable. The length should reflect the number of registers you want to read, not the 32-bit default. If you want to read a single 16-bit register, the length should be set to 1. pizza tower

Here's an updated version of your code:

 

python
Public Epever_data
Public Epever_result

ModbusMaster(Epever_result, ComC1, 115200, 1, 4, Epever_data, 13082, 1, 3, 100, 0)

 

Log in or register to post/reply in the forum.