-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHyperion.txt
230 lines (187 loc) · 10.6 KB
/
Hyperion.txt
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#idString Hyperion, Hyperion
#name Hyperion
#handle Hyperion
#port comfixedbaud
#baudrate 9600
#driver Block
#author rachdatu
; https://crccalc.com/ to convert binary to ASCII
; Checksum function from version 2.07
;#checksum crc16 binhl 0 0 0x8005 0
; This command restarts the device (at your own risk) #scpiCmd RestartDevice tx 0x0c 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x0d
#scpiCmd InputVoltage? txrxn? 240 0x0c 0x30 0x30 0x30 0x41 0x38 0x32 0x30 0x30 0x30 0x30 0x30 0x31 0x46 0x42 0x0d /11h4/1000
; Commands to read data from MEMORY 2 ONLY
;command: 000A81000201FC, the last 4 bytes is the CRC (01FC)
#scpiCmd Memory? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /7h4
#scpiCmd BatteryType? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /11h4
#scpiCmd NumberCells? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /15h4
#scpiCmd Capacity? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /19h4*10
#scpiCmd ChargeCurrent? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /23h4/1000
#scpiCmd DischargeCurrent? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /27h4/1000
#scpiCmd DischargeVoltPerCell? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /31h4/1000
#scpiCmd PeakSense? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /35h4
#scpiCmd CutOffTemp? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /39h4
#scpiCmd ChargeCapacityLimitPercent? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /43h4
#scpiCmd SafetyTimerMin? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /47h4
#scpiCmd PrePeakDelayMin? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /51h4
#scpiCmd TrickleCurrent? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /55h4
#scpiCmd DontKnow1? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /59h4
#scpiCmd DontKnow2? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /63h4
#scpiCmd DontKnow3? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /67h4
#scpiCmd PbBatChargerVoltage? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /71h4/1000
#scpiCmd SetStorePercent? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /74h4
; END of commands reading from MEMORY 2 ONLY
;header: 0x0c, trailer: 0x0d, need the CRC at the very end of the message
#scpiCmd mytest tx 0x0c (value) 0x0d
#scpiCmd switchSoundONCRC txrxn 16 0x0c 0x30 0x30 0x33 0x36 0x30 0x33 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x36 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x31 0x38 0x30 0x31 0x39 0x30 0x30 0x30 0x30 0x39 0x32 0x37 0x31 0x30 0x30 0x41 0x35 0x46 0x0d
; command switchKeySoundON: 0036030000000000010006000100010001000201180190000927100A5F
; command switchKeySoundOFF: 0036030000000000010006000000010001000201180190000927100A5E
#scpiCmd switchSoundKeyON txrxn 16 0x0c 0x30 0x30 0x33 0x36 0x30 0x33 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x36 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x31 0x38 0x30 0x31 0x39 0x30 0x30 0x30 0x30 0x39 0x32 0x37 0x31 0x30 0x30 0x41 0x35 0x46 0x0d
#scpiCmd switchSoundKeyOFF txrxn 16 0x0c 0x30 0x30 0x33 0x36 0x30 0x33 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x36 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x31 0x38 0x30 0x31 0x39 0x30 0x30 0x30 0x30 0x39 0x32 0x37 0x31 0x30 0x30 0x41 0x35 0x45 0x0d
; command to record live data (only for testing), retuns a mega integer, not needed with TC: 000A8A0000020A
#scpiCmd get? txrxn? 396 0x0c 0x30 0x30 0x30 0x41 0x38 0x41 0x30 0x30 0x30 0x30 0x30 0x32 0x30 0x41 0x0d
; command to read MEM 01: 000A81000101FB
; Location in memory, Battery type, Number of cells, Capacity in mAh, Charge current in A, Discharge current in A, Discharge volt/cell, Peak sense in mV/cell, Cutoff Temp in °C, Charge capacity Limit in %, Safety timer in min., Pre peak delay in min., Trickle current in mA, dontknow1, dontknow2,dontknow3, Pb Bat Charger Voltage in volts, Set store in %
#scpiCmd getMEM01? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x31 0x30 0x31 0x46 0x42 0x0d /7h4 11h4 15h4 19h4*10 23h4/1000 27h4/1000 31h4/1000 35h4 39h4 43h4 47h4 51h4 55h4 59h4 63h4 67h4 71h4 75h4
; command to read MEM 02: 000A81000201FC
; Location in memory, Battery type, Number of cells, Capacity in mAh, Charge current in A, Discharge current in A, Discharge volt/cell, Peak sense in mV/cell, Cutoff Temp in °C, Charge capacity Limit in %, Safety timer in min., Pre peak delay in min., Trickle current in mA, dontknow1, dontknow2,dontknow3, Pb Bat Charger Voltage in volts, Set store in %
#scpiCmd getMEM02? txrxn? 84 0x0c 0x30 0x30 0x30 0x41 0x38 0x31 0x30 0x30 0x30 0x32 0x30 0x31 0x46 0x43 0x0d /7h4 11h4 15h4 19h4*10 23h4/1000 27h4/1000 31h4/1000 35h4 39h4 43h4 47h4 51h4 55h4 59h4 63h4 67h4 71h4 75h4
; command to read all 20 memories: 000A0C00010205 (crash, too many values /incorrect number requested )
#scpiCmd allmem? txrxn? 1680 0x0c 0x30 0x30 0x30 0x41 0x30 0x43 0x30 0x30 0x30 0x31 0x30 0x32 0x30 0x35 0x0d
;000E050002000302BF Charge (05), Solo Mode, Start using parameters stored in Memory 02 (0002),
#scpiCmd Charge tx 0x0c 0x30 0x30 0x30 0x45 0x30 0x35 0x30 0x30 0x30 0x32 0x30 0x30 0x30 0x33 0x30 0x32 0x42 0x46 0x0d
;000E060002000302C0 Discharge (06), Solo Mode, Start using parameters stored in Memory 02 (0002),
#scpiCmd Discharge tx 0x0c 0x30 0x30 0x30 0x45 0x30 0x36 0x30 0x30 0x30 0x32 0x30 0x30 0x30 0x33 0x30 0x32 0x43 0x30 0x0d
;000A09000001FA Stop
#scpiCmd STOP tx 0x0c 0x30 0x30 0x30 0x41 0x30 0x39 0x30 0x30 0x30 0x30 0x30 0x31 0x46 0x41 0x0d
;000E070002000302C1 Storage (07), Solo Mode, start using parameters stored in Memory 02 (0002),
#scpiCmd Storage tx 0x0c 0x30 0x30 0x30 0x45 0x30 0x37 0x30 0x30 0x30 0x32 0x30 0x30 0x30 0x33 0x30 0x32 0x43 0x31 0x0d
;000E070007000302C6 Storage (07) 6 cells, Solo Mode, start using parameters stored in Memory 07 (0007),
#scpiCmd Storage6s tx 0x0c 0x30 0x30 0x30 0x45 0x30 0x37 0x30 0x30 0x30 0x37 0x30 0x30 0x30 0x33 0x30 0x32 0x43 0x36 0x0d
;000E110002000302BC Balance (11), Solo Mode, start using parameters stored in Memory 02 (0002),
#scpiCmd Balance tx 0x0c 0x30 0x30 0x30 0x45 0x31 0x31 0x30 0x30 0x30 0x32 0x30 0x30 0x30 0x33 0x30 0x32 0x42 0x43 0x0d
;000A82000001FB Input voltage [V], Output voltage [V], Battery resistance [mOhm], Current Temp., Peak Temp., Charge time (minutes), Charge time (secondes), Capacity mAh, Charge capacity ???, Charge Peak Voltage [V], Discharge time (minutes), Discharge time (seconds), Discharge capacity, Discharge capacity, Charge avg voltage, In Current, Capacity mAh, ??, ??, Discharge current,
#scpiCmd values? txrxn? 240 0x0c 0x30 0x30 0x30 0x41 0x38 0x32 0x30 0x30 0x30 0x30 0x30 0x31 0x46 0x42 0x0d /11h4/1000 15h4/1000 19h4 23h4 27h4 31h4 35h4 39h4 43h4 47h4/1000 51h4 55h4 59h4 63h4 67h4/1000 71h4/1000 75h4 79h4 83h4/1000 87h4
; A list of possible column name with unit and formatter (SI, Time, Int, D0..D6)
#value PsInputVoltage V D1
#value OutputVoltage V D3
#value BatteryResistance mOhm D1
#value CurrentTemperature °C D1
#value PeakTemperature °C D1
#value ChargeTimeMinutes Time D0
#value ChargeTimeSecondes Time D0
#value Capacity mAh D3
#value ChargeCapacity mAh D0
#value ChargePeakVoltage V D3
#value DischargeTimeMinutes Time D0
#value DischargeTimeSecondes Time D0
#value DischargeCapacity mAh D0
#value DischargeCurrent A D3
#value DischargeAvgVoltage V D3
#value PsInputCurrent A D3
#value Capacity mAh D0
#value DontKnow3 V D3
#value DischargeAvgCurrent A D3
#value DischargeCurrent2 A D3
; This is a single line command, definition just above
#askValues values?
; #### Main tab ####
#cmdSetup combobox Battery_type Main
:read: BatteryType?
;:write: BatteryType
;:update: Voltage
;:update: 0.3
:tip: Set the battery type
NiCd 0
NiMh 1
LiIo 2
LiPo 3
LiFe 4
Pb 5
#cmdSetup combobox Number_Cells Main
:read: NumberCells?
;:write: NumberCells
;:update: Voltage
;:update: 0.3
:tip: Set the number of cells
1 1
2 2
3 3
4 4
5 5
6 6
7 7
#cmdSetup number Capacity Main
:read: Capacity?
;:write: Capacity
:tip: Set the capacity in mAh
mAh 0.000 5000
#cmdSetup number Charge-current Main
:read: ChargeCurrent?
;:write: ChargeCurrent
:tip: Set the Charging current in A
A 0.000 5
#cmdSetup number Discharge-current Main
:read: DischargeCurrent?
;:write: DischargeCurrent
:tip: Set the discharging current in A
A 0.000 5
#cmdSetup combobox Memory Main
:read: Memory?
;:write: Memory
:tip: Set the memory location
;:update: Voltage Current
:updatedelayed: 0.3
M1 1
M2 2
M3 3
M4 4
M5 5
M6 6
M7 7
M8 8
M9 9
M10 10
M11 11
M12 12
M13 13
M14 14
M15 15
M16 16
M17 17
M18 18
M19 19
M20 20
#cmdSetup info Input_Voltage Main
:read: InputVoltage?
V
; ### User Setup tab ###
#cmdSetup radio Sound_Key User_Setup
;:read: (not decoded)
:write: switchSoundKeyON
ON 0001
#cmdSetup radio Sound_Key User_Setup
;:read: (not decoded)
:write: switchSoundKeyOFF
OFF 0000
; #### Limits tab ####
#cmdSetup number Discharge-Volt/cell Limits
:read: DischargeVoltPerCell?
;:write: DischargeVoltPerCell
:tip: Set the discharge per cell voltage in V
V 3.000 4.1
#cmdSetup multi Battery Parameters
;:read: BatteryType?;NumberCells?;Capacity?;ChargeCurrent;DischargeCurrent?;Memory?
;:read: BatteryType?
;:write: mytest ("\""+ hex(value,4)+hex(value,4)+hex(2,4)+hex(3,4)+hex(4,4)+hex(5,4)+"\"")
:tip: Enter battery parameters
;info #
combobox NiCd 0 NiMh 1 LiIo 2 LiPo 3 LiFe 4 Pb 5
combobox Cell1 1 cell2 2 cell3 3 cell4 4 cell5 5 cell6 6 cell7 7
;number Capacity Ah 0.1 5
;number ChargeCurrent A 0.1 5
;number DischargeCurrent A 0.1 5
;combobox M1 1 M2 2 M3 3 M4 4 M5 5 M6 6 M7 7 M8 8 M9 9 M10 10 M11 11 M12 12 M13 13 M14 14 M15 15 M16 16 M17 17 M18 18 M19 19 M20 20
;#cmdSetup multi NumberCells Parameters
;:write: mytest ("\""+hex(getElement("0 1 2 3 4 5 6 7",value," "),4)+"\"")
;combobox 1Cell 1 2cell 2 3cell 3 4cell 4 5cell 5 6cell 6 7cell 7