
Remote Control
R&S
®
RTM20xx
459
User Manual 1317.4726.02 ─ 01
chapter 15.2.3, "General Remote Settings and Queries"
*RST
TIM:SCAL 1E-7
CHAN:DATA:POIN DMAX // Set data range
SING;*OPC?
<-- 1
CHAN:DATA:HEAD? // Read header
<-- -4.9980E-07,5.0000E-07,5000,1 // Xstart, Xstop, record length in samples
CHAN:DATA:YRES? // Read vertical resolution
<-- 8
CHAN:DATA:YOR? // Read voltage value for binary value 0
<-- -2.549999943E-2
CHAN:DATA:XOR? // Read time of the first sample
<-- -4.998000058E-7
CHAN:DATA:XINC? // Read time between two adjacent samples
<-- 2.000000023E-10
FORM UINT,8;FORM? // Set data format to unsigned integer, 8 bit
<-- UINT,8
CHAN:DATA:YINC? // Read voltage value per bit
<-- 1.999999949E-4
CHAN:DATA? // Read channel data
<-- 128,125,120... // 5000 bytes total
FORM UINT,16;FORM? // Change data format to unsigned integer, 16 bit
<-- UINT,16
CHAN:DATA:YINC? // Read voltage value per bit
<-- 7.812499803E-7
CHAN:DATA? // Read channel data
<-- 32768,32000,30720... // 10000 bytes total
Note the following correlations:
●
The number of received data values matches the number of samples indicated in the
header.
●
The time of the first sample (XORigin) matches the start time Xstart indicated in the
header.
●
The Y-increment adjusts to the data length defined in the data format (8 or 16 bit).
Data conversion
Definition: the sample numbers start with
0
and end with
record length - 1
.
Sample time
t
n
= n * xInc xOrigin
First sample:
t
0
= -4.998000058E-7
(= Xstart)
Last sample:
t
4999
= 4999 * 2E
−
10
−
4.998E
−
7
= 5.0 E
−
7
(= Xstop)
Programming Examples