-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsiglent-binary.bt
42 lines (33 loc) · 1023 Bytes
/
siglent-binary.bt
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
//
// Siglent binary format, 010 Editor template
//
// 2020.11.04 darell tan
//
LittleEndian();
local int i;
byte unknown[16];
for (i = 0; i < 4; i++) {
double scale <comment="ch vertical scale (mV/div)">;
FSkip(8);
}
for (i = 0; i < 4; i++) {
double offset <comment="ch vertical offset (mV)">;
FSkip(8);
}
FSeek(0xD4); double horizScaling <comment="horizontal scale (seconds/div)">;
FSeek(0xE4); double triggerDelay <comment="trigger pos on screen (seconds)">;
FSeek(0xF4);
uint32 numPoints <comment="number of points">;
double sampleRate <comment="samples/sec">;
// no idea what these are, but they just look like similar blocks
struct {
uint32 a;
uint32 b;
uint32 c;
double d;
} s1, s2;
FSeek(0x800);
if (!FEof()) byte points1[numPoints] <comment="ch 1 data points">;
if (!FEof()) byte points2[numPoints] <comment="ch 2 data points">;
if (!FEof()) byte points3[numPoints] <comment="ch 3 data points">;
if (!FEof()) byte points4[numPoints] <comment="ch 4 data points">;