EEVblog Electronics Community Forum
Products => Test Equipment => Topic started by: boeserbaer on November 28, 2014, 07:11:37 pm
-
Hi all,
I just purchased a Rigol DG4062, and first off, I am very pleased with the unit.
One thing I had a lot of trouble locating was a descriptor of the file format.
After creating some signals using the UltraStation software, I determined that the file format is a very simple 16 bit offset binary. Little Endian. No Header
Basically there are 16384 samples in the file. Each sample is in the range 0 to 16383.
Also, To force the DG4000 to output at 500MSPS, set the period to 32.768 us.
16383 is positive full scale
8192 is zero volts
0 is negative full scale
For those of you who use QT, here is a snippet :
QString outFN = base_fn;
outFN += QString::number(i);
outFN += ".raf";
QFile saveFile(outFN);
if (!saveFile.open(QFile::WriteOnly))
{
qDebug() << "saveFile() unable to open" << outFN;
return -1;
}
qDebug() << "saveData()" << outFN;
QDataStream ds(&saveFile);
ds.setByteOrder(QDataStream::LittleEndian);
for (int j=0;j< 16384;j++)
{
double val = indata[j]; // indata is pre-filled with values in the range -1.0 to 1.0
val *= 8192.0; // now in the range -8192 to 8192
val += 8192.0; // now 0 - 16384
if (val <0)
val = 0.0;
quint16 outInt = val;
if (val > 16383)
val = 16383;
ds << outInt;
}
saveFile.close();
edit: corrected formatting of "C" code
-
Thank you so much!
I have a DG4162, and I expect this information tol come in very handy.
Murray
-
After creating some signals using the UltraStation software, I determined that the file format is a very simple 16 bit offset binary. Little Endian. No Header
Basically there are 16384 samples in the file. Each sample is in the range 0 to 16383.
Also, To force the DG4000 to output at 500MSPS, set the period to 32.768 us.
Thanks very much for figuring this out and documenting it.
We're going to be documenting and writing sigrok input/output modules for this file format. I realize you've basically described the whole thing here, but I wonder if I could impose on you to send me a few files like these generated by your DG4062? Sine, square, ... it would really help to have "real world" files to test against when writing implementations, as testing an implementation against your own synthesized data is just asking for trouble.
-
Hi,
I am not sure what you are asking for? If you want a file which I have created using my QT program, I can certainly give you one.
What I have are basically recorded detector signals, translated for playback by the 4062. Let me know what you mean, and I will post something.
Best Regards, Mike
-
I am not sure what you are asking for? If you want a file which I have created using my QT program, I can certainly give you one.
What I have are basically recorded detector signals, translated for playback by the 4062. Let me know what you mean, and I will post something.
Maybe biot refers to the waveforms you created using the official Rigol UltraStation software -- you mentioned in your original post you created some test signals to help determine the file format.
-
Maybe biot refers to the waveforms you created using the official Rigol UltraStation software...
Sure!
http://www.sigrok.org/wiki/TODO (http://www.sigrok.org/wiki/TODO)
-
I am not sure what you are asking for? If you want a file which I have created using my QT program, I can certainly give you one.
What I have are basically recorded detector signals, translated for playback by the 4062. Let me know what you mean, and I will post something.
Maybe biot refers to the waveforms you created using the official Rigol UltraStation software -- you mentioned in your original post you created some test signals to help determine the file format.
Ah, I was under the impression you could save waveforms which the hardware had on board to a USB stick or something. If that's not possible, sure -- the ones generated by that software will do. As long as I know they work well on the hardware, they'll serve for the purpose.
-
Any suggestions on how to upload a .raf file here?
-
I am so used to gmail examining the contents of zip files, that I forgot about zipping it. Duhh.
-
@ boeserbaer , is this your Wave?
-
That looks exactly like what I put in, but I cannot tell the horizontal scale. The pulses should be separated by 408ns.
-
That looks exactly like what I put in, but I cannot tell the horizontal scale. The pulses should be separated by 408ns.
Look again, Zoom 408nsec /div
EDIT , changed pix to your 408ns/div
-
Just wanted to post that Rigol did provide a specification of the Arb. Wave Gen format across the DG1000/4000/5000 series. It was written in Jan 2015 but probably came out much later than that. I just found it when looking for info on the .RAF file format.
Sparky