File format:Rigol WFM4

From sigrok
Revision as of 15:09, 29 December 2018 by Apo (talk | contribs) (Created page with "{{DISPLAYTITLE:File format:Rigol WFM4}} WFM4 is a proprietary file format used by the Rigol DS4000 series digital storage oscilloscopes. It is used to record the measured...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Header

The known header values that are of interest to sigrok are as follows (addresses are hex):

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

Data

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.