question

klikhier avatar image
klikhier asked

Bug in Victron CAN protocol?

We're doing some CAN-bus work to talk to Victron Cerbo GX. It appears we have found a bug. For Battery Voltage we think we should send an Unsigned Int, but it appears that the Cerbo GX interprets this as a Signed Int.

VE.Can
2 |3000

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

3 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi. I happened to see this message, and checked the docs: for 0x356 its a signed int.


Don’t ask me why its like that, has been since forever - but thats how it is.


Success, and for full docs, ask a sales manager

2 |3000

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

Alex Pescaru avatar image
Alex Pescaru answered ·

Hi @klikhier

Matthijs is right, it's signed. Even the protocol calls for a "16 bits signed int, 2`s complement"

And battery voltage is always a positive number, right?

So signed or unsigned, the value should be the same...

Alex

2 |3000

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

klikhier avatar image
klikhier answered ·

But what if we want to send Battery Voltage of (for example) 350V to the Cerbo. This won't fit in a 16 bits signed int, correct?

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.

Alex Pescaru avatar image Alex Pescaru commented ·

Correct, but you need to take into account that Cerbo is designed for Victron "universe" and I didn't saw until now a Victron equipment to work with a battery bigger than 48V type...

Also these values are somehow adopted from various BMS protocols and these protocols, as I've said, say "16 bit signed". Example below...

2.jpg


1 Like 1 ·
2.jpg (128.6 KiB)

Related Resources

Additional resources still need to be added for this topic