Difference between revisions of "File format:Rigol ROF"

From sigrok
Jump to navigation Jump to search
Line 13: Line 13:
| File identification, consisting of the letters "ROF" and a zero padding (<code>52 4f 46 00</code>)
| File identification, consisting of the letters "ROF" and a zero padding (<code>52 4f 46 00</code>)
|-
|-
| 4 - 5
| 4
| ''unknown'' (<code>01 61</code>, <code>01 6e</code>, <code>01 38</code>)
| ''unknown'' (always <code>01</code> so far)
|-
| 5
| ''unknown'' (<code>61</code>, <code>6e</code>, <code>38</code>)
|-
|-
| 6 - 7
| 6 - 7
Line 23: Line 26:
|-
|-
| 12 - 13
| 12 - 13
| Header CRC
| Header CRC?
|-
|-
| 14 - 15
| 14 - 15
| Data CRC
| Data CRC?
|-
|-
| style="background: #6699ff;" colspan="2" | Metadata header
| style="background: #6699ff;" colspan="2" | Metadata header

Revision as of 22:49, 2 December 2014

ROF is a proprietary file format used by the Rigol DP800 series programmable power supplies. It is used to record the measured voltage and current during operation of the power supply.

Header

The first 28 bytes of the file are structured as follows:

Bytes Field
0 - 3 File identification, consisting of the letters "ROF" and a zero padding (52 4f 46 00)
4 unknown (always 01 so far)
5 unknown (61, 6e, 38)
6 - 7 Length of metadata header, little-endian (0c 00 00 00)
8 - 11 Always 0x00
12 - 13 Header CRC?
14 - 15 Data CRC?
Metadata header
16 - 19 Sample period in seconds, little-endian
20 - 23 Number of points, little-endian
24 - 27 Same as number of points.

The timespan of the file can be determined by:

sample period in seconds * number of points

Data

The data following the header consists of a number of points, where each of these is structured like this:

Bytes Field
0 - 3 Voltage, little-endian, times 10000
4 - 7 Current, little-endian, times 10000

These points are interleaved per channel. The number of channels can be determined like this:

number of channels = data section size / number of points / pointsize (8)

The entire data section thus looks like this:

CH1 voltage
CH1 current
CH2 voltage
CH2 current
CH3 voltage
CH3 current
CH1 voltage
CH1 current
...