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.

CR6 and modbus communication protocol to read Epever solar charge controller


adallo Feb 25, 2023 10:05 AM

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


ClintBarrett Mar 30, 2023 12:06 PM

The problem may be related to converting the address from hex to decimal. It may be worth trying to use the hex address directly in the ModbusMaster() function without converting it to decimal. Also, it is important to make sure that the ModbusMaster() function uses the correct function code for the data you are trying to get. In this case, you are trying to get the battery voltage, so the function code must be 04.


smile Sep 19, 2023 11:04 AM

Hi,

I'm working on it too. Do you have news, updates?
I connected C1 with RS485-B and C2 with RS485-A in the same way, is this correct? but I don't get any answers.

Are the two B signals (pins 3 and 4) the same? also the A (pins 5 and 6)? why are they double?

Do you have a CRbasic that is working? Thank you

Smile


ponda2 Feb 22, 2024 09:47 AM

This post is under review.


MichaelLewis Aug 2, 2024 07:00 AM

This post is under review.

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