File format:Rigol WFM4

From sigrok
Jump to: navigation, search

WFM4 is a proprietary file format used by the Rigol DS4000 series digital storage oscilloscopes. It is used to record the measured waveforms.


The known header values that are of interest to sigrok are as follows (addresses are hex, and data is little endian):

Bytes Field
0 - 3 0xA5 0xA5 0x38 0x00
40 Bitmask of the activated analog channels (LSB is CH1, etc)
60 - 63 Memory depth: Number of samples per channel (uint32)
64 - 67 Sampling rate in Hz (float)
134 - 137 Bytes per channel: memory depth plus padding (uint32)

The timespan of the file can be determined by:

number of points per channel / sampling rate


The channel data starts at offset 0x51EC and is non-interleaved. Each active channel (starting with channel 1) has memory_depth continuous samples, followed by bytes_per_channel - memory_depth bytes of padding.