# 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).
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.
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.