Products > Test Equipment
Rigol DG1000Z RAF file format
<< < (4/4)
Ben321:
I finished writing that program now. It loads an RAF file, and assumes it's an RAF file for a Rigol DG1022Z funcgen. It processes the header, does CRC comparisons, and displays the header info (if a header exists, which it determines based on if the HeaderCRC is correct), as well as displaying the waveform. The box on the left contains the header info (if the header exists), or otherwise states that the HeaderCRC check failed and it's assuming no header. The right box contains the waveform (scaled down to fit, if it's wider than the box), and it gets the waveform from after the header if the HeaderCRC check passes, while treating the entire file as waveform data with no header, if the HeaderCRC check fails. I've attached a zipped copy of the EXE file to this post. To use, just extract it from the zip and run it. Note that running it doesn't involve doubleclicking the exe file in this case, because it needs the path to the file to be loaded, in the command line. Either run it from a command prompt with a valid filename as the first commandline argument, or drag-drop an RAF file onto the exe file.
Njk:
Guys, you're the best. Discovered this thread by chance. BTW the new crop (DG800, DG900, DG2000) supports only the "sample rate" output mode. So that byte is re-purposed for the filter setting specification. In all other respects, the format looks similar.

RAF file format for DG800, DG900, DG2000
______________________________________________
Offset,  Length,   Description.
bytes.   bytes.
______________________________________________
0          4      points number, N (u32, LE)
4          1      1
5          1      0
6          1      low-pass filter setting:  2 - "interpolation", 3 - "step", 4 - "smooth"
7          25      file name, a null-terminated ASCII char string
32        8      sample rate, *10^6 Sa/s (s64, LE)
40        4      high level voltage, *10^7 V (s32, LE)
44        4      low level voltage, *10^7 V (s32, LE)
48        2      points data CRC (u16, LE)
50        2      header CRC (u16, LE)
52        4      0
56       2N      16-bit points data ([s16], LE)
sken:
Dear Njk, and all,
fist of all, thank you for all this work done!

I have some questions for Njk and anyone who has experience with the DG800: is the RAF file for the DG800 model CRC-encoded as well?
And, what about the CSV header for the DG800: anyone can kindly provide me with an example header? Despite both type of file are mentioned in the manual, there are no specs at all.

Thank you,
Luca

Njk:

--- Quote from: sken on September 11, 2023, 03:16:20 pm ---is the RAF file for the DG800 model CRC-encoded as well?

--- End quote ---
The Rigol Ultra app can produce the files for DG800/900/2000. And the viewer mentioned above does recognize the header as valid. Based on that, I think we can safely assume the CRSs are calculated in exactly similar way.

--- Quote ---And, what about the CSV header for the DG800: anyone can kindly provide me with an example header? Despite both type of file are mentioned in the manual, there are no specs at all.

--- End quote ---
Check this manual. There is.
https://www.eevblog.com/forum/testgear/new-rigol-16-bit-function-generators-dg800900-series/msg5004445/#msg5004445
tv84:
Any CRC that Rigol might be using is inside this list:

https://www.eevblog.com/forum/testgear/rigol-dsxxxx-gel-firmware-file-format/msg1415612/#msg1415612
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod