RIGOL Technologies

Welcome, Guest Login

Support Center

Deep memory binary data collection and conversion

Last Updated: Feb 17, 2017 10:02AM PST
This article relates to the 1000Z, 2000, and 4000 Series Oscilloscopes.

There are a number of commands to get the scope trigger and timing setup. You can refer to the individual oscilloscope's programming manual for these. Once you trigger the deep memory capture that you want here is the best way to get the deep memory to a PC. After the // are comments.

Send these commands over USB or Ethernet:

:STOP       //stops the scope acquisition. necessary to pull deep data
:WAV:MODE RAW          //sets mode to get to deep data
:WAV:FORM BYTE          //best format for deep data pull speed
:TIM:SCAL?                  //queries the time per division
(scope returns time per division value)
:CHAN1:SCALE?            //asks scope for volt/div on chan1. assumes you are using channel 1.
(scope returns volts per div value for chan 1)
:CHAN1:OFFS?            //asks scope for position of ground on chan1 on display. assumes you are using channel 1.
(scope returns volts per div value for chan 1)
:TIM:OFFS?            //asks scope for position of trigger from left to right on display. 
(scope returns time offset)
:ACQ:SRAT?          //asks scope for acq rate. in your test it should always be 2 GSa/S. return as 2.00000E+9
(scope returns sample rate)
:ACQ:MDEP?          //asks scope for mem depth or number of points. 
(scope returns memory depth)
//IF the memory depth is in AUTO mode it will return AUTO. If that is the case, then:
// memory depth = sample rate*time scale * # divisions on display 
//1000Z series has 12 divisions on display. 2000A and 4000 has 14 divisions.

//those above do only after you change the settings. Can just do a :SING or :RUN and then :STOP and //then gather new data again after a trigger event.

//Here is the part where we gather the data. 1 million points at a time until all done. This keeps the time //to get the data small enough so that we can avoid timeouts or other connection errors.


// this part we loop through:
:WAV:START 1
:WAV:STOP 1000000
:WAV:DATA?
(scope returns 1 Million and 11 bytes of a header. Strip off the header)

// Repeat the last 2 commands until at the end of the data changing the start value by adding 1000000 to //it each time. If you have less than a million for the last call, reset STOP to the last point #.

// Now Convert the 1 Million data bytes to volts. To do this we use the data we got above:

//the byte values are subtly different by family.






//On the 1000Z Series:

//the timing info:
time between points = 1/<Sample Rate>
time of 1st point relative to trigger= -[(<time pre division>*6)-<time offset>]

On the DS1000Z, you also need to request the wave preamble data to convert the byte values to volts:

The command is :WAV:PRE?

The return looks like:

0,2,12000,1,2.000000e-07,0.000000e+00,0,5.234375e-02,-53,97

The format for this response is:

*******************************************
<format>,<type>,<points>,<count>,<xincrement>,<xorigin>,<xreference>,<yincrem
ent>,<yorigin>,<yreference>

Wherein,
<format>: 0 (BYTE), 1 (WORD) or 2 (ASC).

<type>: 0 (NORMal), 1 (MAXimum) or 2 (RAW).

<points>: an integer between 1 and 12000000. After the memory depth option is
installed, <points> is an integer between 1 and 24000000.

<count>: the number of averages in the average sample mode and 1 in other modes.

<xincrement>: the time difference between two neighboring points in the X direction.

<xorigin>: the start time of the waveform data in the X direction.

<xreference>: the reference time of the data point in the X direction.

<yincrement>: the waveform increment in the Y direction.

<yorigin>: the vertical offset relative to the "Vertical Reference Position" in the Y
direction.

<yreference>: the vertical reference position in the Y direction.


*******************************************

To convert the BYTE return data to voltage you must use:

<yincrement>, <yorigin>, and <yreference> from the preamble once the scope is in STOP mode.

On the 1000Z series oscilloscopes these values for the deep memory differ from the ":CHAN1:SCALE?" and ":CHAN1:OFFS?" values requested earlier.

The formula is:

Volts = ( <BYTE Value> - <yreference> - <yorigin> ) * <yincrement>






//On the 2000 Series:
[<waveform Byte Value> * (ChanScale/25)] - (chanOffset + 5*ChanScale) = <Waveform Volt Value>
//the timing info:
time between points = 1/<Sample Rate>
time of 1st point relative to trigger= -[(<time pre division>*7)-<time offset>]

//On the 4000 Series:
[<waveform Byte Value> * (ChanScale/32)] - (chanOffset + 4*ChanScale) = <Waveform Volt Value>
//the timing info:
time between points = 1/<Sample Rate>
time of 1st point relative to trigger= -[(<time pre division>*7)-<time offset>]



Here is a post with a visual look at the data in UltraSigma from the 1000Z:

https://rigol.desk.com/customer/en/portal/articles/2285685-ds1000z-deep-memory-data-collection-example
Login above for personalized content

RIGOL USA Web Site

f14c465fd642ac49fa5a4bd437615e15@rigol.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete