Victron VE.Can BMS Limits Frame (0x351) Bitfield & C99 Decoder

Decode Victron GX BMS charge voltage limit (CVL), max charge current limit (CCL) and discharge current limit (DCL) bytes from CAN frame 0x351.

Jump to results

Inputs

Captured payload
Classic CAN 8 bytes or CAN FD 16 bytes. Spaces are optional.
DBC signals
Signal 1
Signal 2
Signal 3

Results

Estimates
Decoded signals3
Charge voltage limit
52.39 V
Charge current limit
26 A
Discharge current limit
32.1 A
Bit map · 64 bits
B0 · 77B1 · 14B2 · 04B3 · 01B4 · 41B5 · 01B6 · 00B7 · 0076543210 Bit 7 = 0 · Charge voltage limit 0 Bit 6 = 1 · Charge voltage limit 1 Bit 5 = 1 · Charge voltage limit 1 Bit 4 = 1 · Charge voltage limit 1 Bit 3 = 0 · Charge voltage limit 0 Bit 2 = 1 · Charge voltage limit 1 Bit 1 = 1 · Charge voltage limit 1 Bit 0 = 1 · Charge voltage limit 1 Bit 15 = 0 · Charge voltage limit 0 Bit 14 = 0 · Charge voltage limit 0 Bit 13 = 0 · Charge voltage limit 0 Bit 12 = 1 · Charge voltage limit 1 Bit 11 = 0 · Charge voltage limit 0 Bit 10 = 1 · Charge voltage limit 1 Bit 9 = 0 · Charge voltage limit 0 Bit 8 = 0 · Charge voltage limit 0 Bit 23 = 0 · Charge current limit 0 Bit 22 = 0 · Charge current limit 0 Bit 21 = 0 · Charge current limit 0 Bit 20 = 0 · Charge current limit 0 Bit 19 = 0 · Charge current limit 0 Bit 18 = 1 · Charge current limit 1 Bit 17 = 0 · Charge current limit 0 Bit 16 = 0 · Charge current limit 0 Bit 31 = 0 · Charge current limit 0 Bit 30 = 0 · Charge current limit 0 Bit 29 = 0 · Charge current limit 0 Bit 28 = 0 · Charge current limit 0 Bit 27 = 0 · Charge current limit 0 Bit 26 = 0 · Charge current limit 0 Bit 25 = 0 · Charge current limit 0 Bit 24 = 1 · Charge current limit 1 Bit 39 = 0 · Discharge current limit 0 Bit 38 = 1 · Discharge current limit 1 Bit 37 = 0 · Discharge current limit 0 Bit 36 = 0 · Discharge current limit 0 Bit 35 = 0 · Discharge current limit 0 Bit 34 = 0 · Discharge current limit 0 Bit 33 = 0 · Discharge current limit 0 Bit 32 = 1 · Discharge current limit 1 Bit 47 = 0 · Discharge current limit 0 Bit 46 = 0 · Discharge current limit 0 Bit 45 = 0 · Discharge current limit 0 Bit 44 = 0 · Discharge current limit 0 Bit 43 = 0 · Discharge current limit 0 Bit 42 = 0 · Discharge current limit 0 Bit 41 = 0 · Discharge current limit 0 Bit 40 = 1 · Discharge current limit 1 Bit 55 = 0 · unassigned 0 Bit 54 = 0 · unassigned 0 Bit 53 = 0 · unassigned 0 Bit 52 = 0 · unassigned 0 Bit 51 = 0 · unassigned 0 Bit 50 = 0 · unassigned 0 Bit 49 = 0 · unassigned 0 Bit 48 = 0 · unassigned 0 Bit 63 = 0 · unassigned 0 Bit 62 = 0 · unassigned 0 Bit 61 = 0 · unassigned 0 Bit 60 = 0 · unassigned 0 Bit 59 = 0 · unassigned 0 Bit 58 = 0 · unassigned 0 Bit 57 = 0 · unassigned 0 Bit 56 = 0 · unassigned 0

Select a bit to see its position and matching signals.

  • Charge voltage limit
  • Charge current limit
  • Discharge current limit

An asterisk marks an overlapping bit.

Decoded signal values
SignalEncodingRaw integerRaw hexPhysical
Charge voltage limitIntel52390x147752.39 V
Charge current limitIntel2600x10426 A
Discharge current limitIntel3210x14132.1 A
Generated C99 masks and functions
#include <stdint.h>

/* Pass a validated payload of at least 8 bytes. */
#define DBC_BIT(data, b) ((uint64_t)(((data)[(b) / 8] >> ((b) % 8)) & 1u))

#define DBC_1_CHARGE_VOLTAGE_LIMIT_MASK UINT64_C(0xFFFF)
#define DBC_1_CHARGE_VOLTAGE_LIMIT_RAW(data) (( \
    (DBC_BIT((data), 0) << 0) | \
    (DBC_BIT((data), 1) << 1) | \
    (DBC_BIT((data), 2) << 2) | \
    (DBC_BIT((data), 3) << 3) | \
    (DBC_BIT((data), 4) << 4) | \
    (DBC_BIT((data), 5) << 5) | \
    (DBC_BIT((data), 6) << 6) | \
    (DBC_BIT((data), 7) << 7) | \
    (DBC_BIT((data), 8) << 8) | \
    (DBC_BIT((data), 9) << 9) | \
    (DBC_BIT((data), 10) << 10) | \
    (DBC_BIT((data), 11) << 11) | \
    (DBC_BIT((data), 12) << 12) | \
    (DBC_BIT((data), 13) << 13) | \
    (DBC_BIT((data), 14) << 14) | \
    (DBC_BIT((data), 15) << 15) \
) & DBC_1_CHARGE_VOLTAGE_LIMIT_MASK)
static inline double dbc_1_charge_voltage_limit_physical(const uint8_t data[static 8]) {
    const uint64_t raw = DBC_1_CHARGE_VOLTAGE_LIMIT_RAW(data);
    const uint64_t value = raw;
    return (double)value * (0.01) + (0.0);
}

#define DBC_2_CHARGE_CURRENT_LIMIT_MASK UINT64_C(0xFFFF)
#define DBC_2_CHARGE_CURRENT_LIMIT_RAW(data) (( \
    (DBC_BIT((data), 16) << 0) | \
    (DBC_BIT((data), 17) << 1) | \
    (DBC_BIT((data), 18) << 2) | \
    (DBC_BIT((data), 19) << 3) | \
    (DBC_BIT((data), 20) << 4) | \
    (DBC_BIT((data), 21) << 5) | \
    (DBC_BIT((data), 22) << 6) | \
    (DBC_BIT((data), 23) << 7) | \
    (DBC_BIT((data), 24) << 8) | \
    (DBC_BIT((data), 25) << 9) | \
    (DBC_BIT((data), 26) << 10) | \
    (DBC_BIT((data), 27) << 11) | \
    (DBC_BIT((data), 28) << 12) | \
    (DBC_BIT((data), 29) << 13) | \
    (DBC_BIT((data), 30) << 14) | \
    (DBC_BIT((data), 31) << 15) \
) & DBC_2_CHARGE_CURRENT_LIMIT_MASK)
static inline double dbc_2_charge_current_limit_physical(const uint8_t data[static 8]) {
    const uint64_t raw = DBC_2_CHARGE_CURRENT_LIMIT_RAW(data);
    const uint64_t value = raw;
    return (double)value * (0.1) + (0.0);
}

#define DBC_3_DISCHARGE_CURRENT_LIMIT_MASK UINT64_C(0xFFFF)
#define DBC_3_DISCHARGE_CURRENT_LIMIT_RAW(data) (( \
    (DBC_BIT((data), 32) << 0) | \
    (DBC_BIT((data), 33) << 1) | \
    (DBC_BIT((data), 34) << 2) | \
    (DBC_BIT((data), 35) << 3) | \
    (DBC_BIT((data), 36) << 4) | \
    (DBC_BIT((data), 37) << 5) | \
    (DBC_BIT((data), 38) << 6) | \
    (DBC_BIT((data), 39) << 7) | \
    (DBC_BIT((data), 40) << 8) | \
    (DBC_BIT((data), 41) << 9) | \
    (DBC_BIT((data), 42) << 10) | \
    (DBC_BIT((data), 43) << 11) | \
    (DBC_BIT((data), 44) << 12) | \
    (DBC_BIT((data), 45) << 13) | \
    (DBC_BIT((data), 46) << 14) | \
    (DBC_BIT((data), 47) << 15) \
) & DBC_3_DISCHARGE_CURRENT_LIMIT_MASK)
static inline double dbc_3_discharge_current_limit_physical(const uint8_t data[static 8]) {
    const uint64_t raw = DBC_3_DISCHARGE_CURRENT_LIMIT_RAW(data);
    const uint64_t value = raw;
    return (double)value * (0.1) + (0.0);
}
Generated Python 3 decoder
# Pure Python 3 CAN decoder for a 8-byte payload.
FRAME_LEN = 8

def dbc_1_charge_voltage_limit_physical(data: bytes) -> float:
    if len(data) < 8:
        raise ValueError("Expected at least 8 payload bytes")
    raw = (int.from_bytes(data[:8], "little") >> 0) & 0xFFFF
    return raw * (0.01) + (0.0)

def dbc_2_charge_current_limit_physical(data: bytes) -> float:
    if len(data) < 8:
        raise ValueError("Expected at least 8 payload bytes")
    raw = (int.from_bytes(data[:8], "little") >> 16) & 0xFFFF
    return raw * (0.1) + (0.0)

def dbc_3_discharge_current_limit_physical(data: bytes) -> float:
    if len(data) < 8:
        raise ValueError("Expected at least 8 payload bytes")
    raw = (int.from_bytes(data[:8], "little") >> 32) & 0xFFFF
    return raw * (0.1) + (0.0)

def decode_frame(data: bytes) -> dict[str, float]:
    return {
        "dbc_1_charge_voltage_limit": dbc_1_charge_voltage_limit_physical(data),
        "dbc_2_charge_current_limit": dbc_2_charge_current_limit_physical(data),
        "dbc_3_discharge_current_limit": dbc_3_discharge_current_limit_physical(data),
    }

Inspect dynamic CVL, CCL and DCL closed-loop charge limits sent to a GX controller

In closed-loop Victron ESS and off-grid systems, CAN message ID 0x351 commands the GX device’s dynamic Charge Voltage Limit (CVL), Charge Current Limit (CCL) and Discharge Current Limit (DCL) every second.

Bytes 77 14 decode in Intel little-endian order as 0x1477 (5,239 × 0.01 = 52.39 V CVL), 04 01 becomes 0x0104 (260 → 26.0 A CCL), and 41 01 yields 0x0141 (321 → 32.1 A DCL).

Formulas

  • CVL = (0x14 << 8 | 0x77) × 0.01 = 5,239 × 0.01 = 52.39 V
  • CCL = (0x01 << 8 | 0x04) × 0.1 = 260 × 0.1 = 26.0 A
  • Cold CCL derate (64 00) = 100 × 0.1 = 10.0 A charge limit

Worked example

Frame 77 14 04 01 41 01 00 00 unpacks via Intel LE bitfields to 52.39 V CVL, 26 A max charge current and 32.1 A discharge limit; the cold derate payload drops CCL cleanly to 10 A.

Engineering references

Frequently asked questions

How do Victron GX controllers throttle MPPT solar chargers when a cell approaches high voltage?

When the BMS shrinks CCL toward 0 A in 0x351—or lowers CVL slightly—the Cerbo GX’s DVCC controller throttles connected MPPT and MultiPlus chargers simultaneously without tripping the main FETs.

What happens if CAN communication drops completely between the BMS and GX?

Without a keep-alive 0x351/0x35E frame, DVCC stops closed-loop charging (or falls back per GX settings) to avoid blindly overcharging an unmonitored LiFePO4 pack.

Why does CVL sometimes say 55.2 V or 56.0 V instead of 58.4 V on a 16S BMS?

Many managed ESS protocols limit charging at 3.45–3.50 V/cell (~55.2–56.0 V) to lengthen LFP cycle life and leave room above knee voltage for passive/active balancing.