question

vici avatar image
vici asked

Explanation Modbus-TCP register list

Hi community,

where can I find an explanation of the values in the Modbus TCP register list Excel? The Excel contains short information in the "Remarks" column. However, this is not filled out for all lines and sometimes not clear for me.

As an an example of my problem:

Excel Line 289: com.victronenergy.grid - Grid L1 - Power - 2600 in W.

I think it delivers the power on L1 via the EM24 that is consumed by the home network. If so, I have a big issue ;-) . The value is given as up to 65102 W. The L2 value is in a similar range. Hi community,

where can I found a Explanation to Modbus-TCP register list Excel?


cerbo gxModbus 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.

4 Answers
wkirby avatar image
wkirby answered ·

Are you perhaps reading the value as a uint instead of a int?
65102 uint would be -434 as an int (a signed integer).
Column D tells you what the data type is, uint16, int16 uint32 etc.

2 |3000

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

johnone avatar image
johnone answered ·

I agree the docs aren't easy to navigate. But, do you mean Excel Line 289 or 298? "com.victronenergy.grid - Grid L1 - Power - 2600 in W" is 298 in the Excel sheet I can see. The best examples I've found in the docs is in the 'Mode2 detail' section of the 'ESS mode 2 and 3' doc https://www.victronenergy.com/live/ess:ess_mode_2_and_3

2 |3000

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

vici avatar image
vici answered ·

Oops right. I gave the wrong line number. Correct is 298.

Ok, is there really no central document with explanations for the values in the Excel? That would be a pity.


I have now noticed that the values with 65000 are always displayed when the phases in the grid are negative. Means, whenever I get a negative value for the phase displayed under Grid on the Cerbo, a value around 65000 is supplied by the TCP-Modbus.


Is that intentional or a bug?

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.

wkirby avatar image wkirby ♦♦ commented ·

No it's not a bug. Computers can't do negative numbers, so the MSB is used to denote whether or not the number is negative.

So, 0111111111111111 (32767 decimal) is the highest positive number you can have as a signed int. The next number would be 1000000000000000 which is 32768 if read as an uint or -32768 if read as an int. You see, the MSB signifies the number positive or negative if you read the value as a signed integer.

So it's on you to read the value correctly and Column D tells you how you should read it.

Here is a nice calculator to play with, it returns the decimal number and its 2's compliment to make it easy to see what's going on.
https://www.rapidtables.com/convert/number/binary-to-decimal.html

0 Likes 0 ·
vici avatar image
vici answered ·

Thanks for the tip! That's the solution to the issue.


I would still like a central and meaningful description of values for Excel. ;-)

2 |3000

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