question

pvleo avatar image
pvleo asked

SmartSolar MPPT read energy counter without overflow via Modbus

Hello,

we are responsible for several pv plants with a combination of some SmartSolar MPPTs, Quattro inverters and either a Color Control GX display or a Cerbo GX unit.

The values of the plant are read out by communicating with CCGX/Cerbo via Modbus TCP using the registers from the CCGX-Modbus-TCP-register-list-2.90.

However, we are trying to get the total generated energy by reading out the user yield (address 790): Energy generated by the solarcharger.

This register is defined as uint16 and has an overflow each 6553.5 kWh.


  • Is there any way to get a total counter of the pv generated energy as uint32 or similar?
  • Also it seems that there is no way to read out the 'lifetime total energy' mentioned in the manual of the SmartSolar MPPT.


I would be grateful if someone could help me solving this issue.

Regards, Leo


Modbus TCP
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
wkirby avatar image
wkirby answered ·

A 32bit number could not be read out because there is already another entity occupying the next register. A uint32 is actually two consecutive uint16 registers joined together.
A Lifetime Energy register is not available.

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

pvleo avatar image pvleo commented ·
OK, thanks for the clarification.

Seems that there is no intent to improve the modbus tcp communication interface.


0 Likes 0 ·
wkirby avatar image wkirby ♦♦ pvleo commented ·

You're right, there is very likely zero intent for industry to alter a 45 year old communication interface standard. Existing equipment which has been operating in factories for a few decades would then suffer compatibility issues with newer equipment using some newer sort of interface standard. So, the standard remains the same as it always has been.
Modbus was designed in the late 1970's. People were perfectly at ease with 8bit computers in those days, so having 16bit holding registers was probably seen as something nobody would ever fill.
Although the register's bit length remains the same, modern 32bit numbers have to be stored over two consecutive registers and then read the two consecutive registers, that's the work around.

0 Likes 0 ·
pvleo avatar image pvleo wkirby ♦♦ commented ·
I guess it would still be possible for victron to add a register pair that can be used as a single uint32 user yield counter. There are enough examples in the register list where this has been already done: eg Total energy produced starting at address 4404.


If the new register pair would be placed at an unused address (there are some empty addresses >= 792 or >= 3728), it won't hurt existing installations.


0 Likes 0 ·
tnt369 avatar image
tnt369 answered ·

I usually solve this by creating a separate counter in the superordinate system:

Read actual value => "new" (uint16)

"diff" = "new" - "old" (diff => int16 !)

"old" = "new" (old => uint16)

"Value" = "Value" + "diff" (Value => uint32 o. similar)

The solution is that during the subtraction (new-old) the overflow leads to the correct result through the 16-bit calculation because the sign/overflow is omitted. The difference is then added to the count value, which can have any number format.


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

pvleo avatar image pvleo commented ·
This is a helpful workaround. Thanks
1 Like 1 ·

Related Resources