-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.yml
341 lines (341 loc) · 9.99 KB
/
device.yml
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
%YAML 1.1
---
# yaml-language-server: $schema=https://harp-tech.org/draft-02/schema/device.json
device: LoadCells
whoAmI: 1232
firmwareVersion: "1.1"
hardwareTargets: "1.0"
registers:
AcquisitionState:
address: 32
access: Write
type: U8
maskType: EnableFlag
description: Enables the data acquisition.
LoadCellData:
address: 33
type: S16
length: 8
access: Event
description: Value of single ADC read from all load cell channels.
payloadSpec:
Channel0:
offset: 0
Channel1:
offset: 1
Channel2:
offset: 2
Channel3:
offset: 3
Channel4:
offset: 4
Channel5:
offset: 5
Channel6:
offset: 6
Channel7:
offset: 7
DigitalInputState:
address: 34
access: Event
type: U8
maskType: DigitalInputs
description: Status of the digital input pin 0. An event will be emitted when DI0Trigger == None.
SyncOutputState:
address: 35
access: Event
type: U8
maskType: SyncOutputs
description: Status of the digital output pin 0. An periodic event will be emitted when DO0Sync == ToggleEachSecond.
BufferThresholdState:
address: 36
access: Read
visibility: private
type: U8
description: State of the buffer thresholds.
Reserved0: &ReservedReg
address: 37
access: Read
visibility: private
type: U8
description: Reserved
Reserved1:
<<: *ReservedReg
address: 38
DI0Trigger:
address: 39
access: Write
type: U8
maskType: TriggerConfig
description: Configuration of the digital input pin 0.
DO0Sync:
address: 40
access: Write
type: U8
maskType: SyncConfig
description: Configuration of the digital output pin 0.
DO0PulseWidth:
address: 41
access: Write
type: U8
minValue: 1
maxValue: 255
description: Pulse duration (ms) for the digital output pin 0. The pulse will only be emitted when DO0Sync == Pulse.
DigitalOutputSet: &output
address: 42
type: U16
access: Write
maskType: DigitalOutputs
description: Set the specified digital output lines.
DigitalOutputClear:
<<: *output
address: 43
description: Clear the specified digital output lines.
DigitalOutputToggle:
<<: *output
address: 44
description: Toggle the specified digital output lines
DigitalOutputState:
<<: *output
address: 45
access: [Write, Event]
description: Write the state of all digital output lines. An event will be emitted when the value of any pin was changed by a threshold event.
Reserved2:
<<: *ReservedReg
address: 46
Reserved3:
<<: *ReservedReg
address: 47
OffsetLoadCell0: &offsetloadcell
address: 48
access: Write
type: S16
minValue: -255
maxValue: 255
defaultValue: 0
description: Offset value for Load Cell channel 0.
OffsetLoadCell1:
<<: *offsetloadcell
address: 49
description: Offset value for Load Cell channel 1.
OffsetLoadCell2:
<<: *offsetloadcell
address: 50
description: Offset value for Load Cell channel 2.
OffsetLoadCell3:
<<: *offsetloadcell
address: 51
description: Offset value for Load Cell channel 3.
OffsetLoadCell4:
<<: *offsetloadcell
address: 52
description: Offset value for Load Cell channel 4.
OffsetLoadCell5:
<<: *offsetloadcell
address: 53
description: Offset value for Load Cell channel 5.
OffsetLoadCell6:
<<: *offsetloadcell
address: 54
description: Offset value for Load Cell channel 6.
OffsetLoadCell7:
<<: *offsetloadcell
address: 55
description: Offset value for Load Cell channel 7.
Reserved4:
<<: *ReservedReg
address: 56
Reserved5:
<<: *ReservedReg
address: 57
DO1TargetLoadCell: &targetloadcell
address: 58
access: Write
type: U8
maskType: LoadCellChannel
description: Target Load Cell that will be used to trigger a threshold event on DO1 pin.
DO2TargetLoadCell:
<<: *targetloadcell
address: 59
description: Target Load Cell that will be used to trigger a threshold event on DO2 pin.
DO3TargetLoadCell:
<<: *targetloadcell
address: 60
description: Target Load Cell that will be used to trigger a threshold event on DO3 pin.
DO4TargetLoadCell:
<<: *targetloadcell
address: 61
description: Target Load Cell that will be used to trigger a threshold event on DO4 pin.
DO5TargetLoadCell:
<<: *targetloadcell
address: 62
description: Target Load Cell that will be used to trigger a threshold event on DO5 pin.
DO6TargetLoadCell:
<<: *targetloadcell
address: 63
description: Target Load Cell that will be used to trigger a threshold event on DO6 pin.
DO7TargetLoadCell:
<<: *targetloadcell
address: 64
description: Target Load Cell that will be used to trigger a threshold event on DO7 pin.
DO8TargetLoadCell:
<<: *targetloadcell
address: 65
description: Target Load Cell that will be used to trigger a threshold event on DO8 pin.
DO1Threshold: &thresholdvalue
address: 66
access: Write
type: S16
description: Value used to threshold a Load Cell read, and trigger DO1 pin.
DO2Threshold:
<<: *thresholdvalue
address: 67
description: Value used to threshold a Load Cell read, and trigger DO2 pin.
DO3Threshold:
<<: *thresholdvalue
address: 68
description: Value used to threshold a Load Cell read, and trigger DO3 pin.
DO4Threshold:
<<: *thresholdvalue
address: 69
description: Value used to threshold a Load Cell read, and trigger DO4 pin.
DO5Threshold:
<<: *thresholdvalue
address: 70
description: Value used to threshold a Load Cell read, and trigger DO5 pin.
DO6Threshold:
<<: *thresholdvalue
address: 71
description: Value used to threshold a Load Cell read, and trigger DO6 pin.
DO7Threshold:
<<: *thresholdvalue
address: 72
description: Value used to threshold a Load Cell read, and trigger DO7 pin.
DO8Threshold:
<<: *thresholdvalue
address: 73
description: Value used to threshold a Load Cell read, and trigger DO8 pin.
DO1TimeAboveThreshold: &bufferedthreshold
address: 74
access: Write
type: U16
defaultValue: 0
description: Time (ms) above threshold value that is required to trigger a DO1 pin event.
DO2TimeAboveThreshold:
<<: *bufferedthreshold
address: 75
description: Time (ms) above threshold value that is required to trigger a DO2 pin event.
DO3TimeAboveThreshold:
<<: *bufferedthreshold
address: 76
description: Time (ms) above threshold value that is required to trigger a DO3 pin event.
DO4TimeAboveThreshold:
<<: *bufferedthreshold
address: 77
description: Time (ms) above threshold value that is required to trigger a DO4 pin event.
DO5TimeAboveThreshold:
<<: *bufferedthreshold
address: 78
description: Time (ms) above threshold value that is required to trigger a DO5 pin event.
DO6TimeAboveThreshold:
<<: *bufferedthreshold
address: 79
description: Time (ms) above threshold value that is required to trigger a DO6 pin event.
DO7TimeAboveThreshold:
<<: *bufferedthreshold
address: 80
description: Time (ms) above threshold value that is required to trigger a DO7 pin event.
DO8TimeAboveThreshold:
<<: *bufferedthreshold
address: 81
description: Time (ms) above threshold value that is required to trigger a DO8 pin event.
DO1TimeBelowThreshold:
<<: *bufferedthreshold
address: 82
description: Time (ms) below threshold value that is required to trigger a DO1 pin event.
DO2TimeBelowThreshold:
<<: *bufferedthreshold
address: 83
description: Time (ms) below threshold value that is required to trigger a DO2 pin event.
DO3TimeBelowThreshold:
<<: *bufferedthreshold
address: 84
description: Time (ms) below threshold value that is required to trigger a DO3 pin event.
DO4TimeBelowThreshold:
<<: *bufferedthreshold
address: 85
description: Time (ms) below threshold value that is required to trigger a DO4 pin event.
DO5TimeBelowThreshold:
<<: *bufferedthreshold
address: 86
description: Time (ms) below threshold value that is required to trigger a DO5 pin event.
DO6TimeBelowThreshold:
<<: *bufferedthreshold
address: 87
description: Time (ms) below threshold value that is required to trigger a DO6 pin event.
DO7TimeBelowThreshold:
<<: *bufferedthreshold
address: 88
description: Time (ms) below threshold value that is required to trigger a DO7 pin event.
DO8TimeBelowThreshold:
<<: *bufferedthreshold
address: 89
description: Time (ms) below threshold value that is required to trigger a DO8 pin event.
EnableEvents:
address: 90
access: Write
type: U8
maskType: LoadCellEvents
description: Specifies the active events in the device.
bitMasks:
DigitalInputs:
description: Available digital input lines.
bits:
DI0: 0x1
SyncOutputs:
description: Specifies the state output synchronization lines.
bits:
DO0: 0x1
DigitalOutputs:
description: Specifies the state of port digital output lines.
bits:
DO1: 0x1
DO2: 0x2
DO3: 0x4
DO4: 0x8
DO5: 0x10
DO6: 0x20
DO7: 0x40
DO8: 0x80
LoadCellEvents:
description: The events that can be enabled/disabled.
bits:
LoadCellData: 0x1
DigitalInput: 0x2
SyncOutput: 0x4
Thresholds: 0x8
groupMasks:
TriggerConfig:
description: Available configurations when using a digital input as an acquisition trigger.
values:
None: 0
RisingEdge: 1
FallingEdge: 2
SyncConfig:
description: Available configurations when using a digital output pin to report firmware events.
values:
None: 0
Heartbeat: 1
Pulse: 2
LoadCellChannel:
description: Available target load cells to be targeted on threshold events.
values:
Channel0: 0
Channel1: 1
Channel2: 2
Channel3: 3
Channel4: 4
Channel5: 5
Channel6: 6
Channel7: 7
None: 8