-
Notifications
You must be signed in to change notification settings - Fork 2
/
devices-dcc50s.h
49 lines (44 loc) · 1.99 KB
/
devices-dcc50s.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Renogy DCC50S DC-DC Charger Modbus 485 register schema
#define DCC50S_REG_START 0x100
#define DCC50S_REG_AUX_SOC 0 // 0x100
#define DCC50S_REG_AUX_V 1
#define DCC50S_REG_AUX_A 2
#define DCC50S_REG_TEMPERATURE 3
#define DCC50S_REG_ALT_V 4
#define DCC50S_REG_ALT_A 5
#define DCC50S_REG_ALT_W 6
#define DCC50S_REG_SOL_V 7
#define DCC50S_REG_SOL_A 8
#define DCC50S_REG_SOL_W 9 // 0x109
#define DCC50S_REG_DAY_MIN_V 11 // 0x10B
#define DCC50S_REG_DAY_MAX_V 12 // 0x10C
#define DCC50S_REG_DAY_MAX_A 13 // 0x10D
#define DCC50S_REG_DAY_MAX_W 15 // 0x10F
#define DCC50S_REG_DAY_TOTAL_AH 17 // 0x113
#define DCC50S_REG_DAY_COUNT 21 // 0x115
#define DCC50S_REG_CHARGE_STATE 32 // 0x120
#define DCC50S_REG_ERR_1 33 // 0x121
#define DCC50S_REG_ERR_2 34 // 0x122
#define DCC50S_REG_END 35
#define DCC50S_CHARGE_STATE_NONE 0
#define DCC50S_CHARGE_STATE_SOLAR (1 << 2)
#define DCC50S_CHARGE_STATE_EQ (1 << 3)
#define DCC50S_CHARGE_STATE_BOOST (1 << 4)
#define DCC50S_CHARGE_STATE_FLOAT (1 << 5)
#define DCC50S_CHARGE_STATE_LIMITED (1 << 6)
#define DCC50S_CHARGE_STATE_ALT (1 << 7)
// For DCC50S_REG_ERR_1
#define DCC50S_ERR_TOO_COLD (1 << 11)
#define DCC50S_ERR_OVERCHARGE (1 << 10)
#define DCC50S_ERR_RPOLARITY (1 << 9)
#define DCC50S_ERR_ALT_OVER_VOLT (1 << 8)
#define DCC50S_ERR_ALT_OVER_AMP (1 << 5)
// For DCC50S_REG_ERR_2
#define DCC50S_ERR_AUX_DISCHARGED (1 << 0)
#define DCC50S_ERR_AUX_OVER_VOLT (1 << 1)
#define DCC50S_ERR_AUX_UNDER_VOLT (1 << 2)
#define DCC50S_ERR_CTRL_OVERHEAT (1 << 5)
#define DCC50S_ERR_AUX_OVERHEAT (1 << 6)
#define DCC50S_ERR_SOL_OVER_AMP (1 << 7)
#define DCC50S_ERR_SOL_OVER_VOLT (1 << 9)
#define DCC50S_ERR_SOL_RPOLARITY (1 << 12)