question

karl-1 avatar image
karl-1 asked

Set current limit in SmartSolar via ve.direct HEX: How to set "network mode register"?

Hi,

can someone please verify the following and complete the value for the 0x200E (network mode) register?


As far as I understood, to set the charge current limit you have to set

- the register 0x2015 for the Charge current limit and

- the register 0x200E for the network mode.


The command to set the current limit to e.g. 12.5A by setting the recommended register 0x2015 should look like this:

:81520007D009B

where

: is the start of command

8 means "SET"

1520 is name of the current-limit- register 0x2015; the two parts 20 <-> 15 are reversed because of "little endian"

00 flags, must (?) be zero

7D00 --> 0x007D (s.above little endian) is hex for decimal 125 (current is in 100mA, not in A, so that ‚125‘ means 12.5)

9B check; the check must be calculated so that the sum of all numbers (not digits! 15 and 20 are two numbers, not four), including the check, modulo 256 is 85 (0x55); here:

in hex: 0x8 + 0x15 + 0x20 + 0x00 + 0x7D + 0x00 + 0x9B = 0x155

in dec: 8 + 21 + 32 + 00 + 125 + 00 + 155 = 341; 341 modulo 256 = 85 = 0x55


Is that right?

see also [1]

(The other current-limit-register 0xEDF0 is in the non-volatile memory and suffers from write operations; for any reasons that register is used in the example in [2] page 24)


Additionally the network mode register 0x200E must be set (s. [2] page 19 table page 23 last paragraph "Charge current limit (register 0x2015)" and page 20 "Network mode bit definitions (register 0x200E)"), I guess to "BMS mode", right? (s. [2] page 21 "BMS controlled ... Control only the current limit, the charger uses its own bulk-absorption-float state machine to determine the voltage setpoint.")

Both commands must be repeated more than once per minute (s. [2] page 23 last paragraph)

Is that right so far?


And now what I don't understand: How to set BMS. In that paper [2] there're these infos:

"BMS mode Set 0x200E to b0001001, write to registers 0x2001 and/or 0x2015"

What is "b0001001"? It contains only 7 bits, not 8. Isn't notation for dual system 0b...?

Can anyone help please? I need an explanation, preferably with the example command like 80E2000????ck, but with the ???? filled properly.


Thanks a lot!!


[1] https://community.victronenergy.com/questions/76778/set-charge-current-on-mppt-via-hex.html

[2] VE.Direct Protocol Rev.17, mppt-hex-protocol.pdf

VE.Directcharge current limitmppt state
2 |3000

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

5 Answers
Paul Simon avatar image
Paul Simon answered ·

Yes, 9B is the correct checksum. Take a look at "Network mode bit definitions (register 0x200E)": You'll see that the 7th bit (when counting from zero) is "reserved" - which means it is simply not used. 0b1001 is 0x09.

2 |3000

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

karl-1 avatar image
karl-1 answered ·

Thank you very much for your quick answer!

I'm still a little bit confused: In [1] p.19 in the table "Remote control registers" the type of the "network mode register 0x200E" is "un8". That looks like one byte. So, for the BMS-mode "b0001001", one has to send just one character "9" or two "09"?

(blanks for better clarity only, the command is to be send witout blanks)

: 8 0E 20 00 9 4D

or

: 8 0E 20 00 09 4D



2 |3000

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

Paul Simon avatar image
Paul Simon answered ·

Hi, you would have to send "09" as two hexadecimal values represent one byte. Half a byte is called a "nibble". Only the command code (get or set, 7 or 8) gets send as a nibble. All other data is sent as full bytes in low endian order. Compare on page three of the protocol specification document:

: [command] [dataHighNibble, dataLowNibble][……] [checkHigh, checkLow] \n

So in your case :80E2000094D would be the right command to set the 0th and 3rd bit of the Network mode register (BMS controlled).

2 |3000

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

Paul Simon avatar image
Paul Simon answered ·

And yes: I found the document a bit confusing as well. The most important parts, e.g. general frame format, should be a bit more detailed. And the fact that the controller works with low endian data but the document uses big endian register addressing is plainly stupid!

2 |3000

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

karl-1 avatar image
karl-1 answered ·

Thank you for your patience! You helped me a lot!

2 |3000

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

Related Resources

VE.Direct protocol FAQ

Additional resources still need to be added for this topic