Rigol ROF

From sigrok
(Redirected from File format:Rigol rof)
Jump to: navigation, search

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
...