![Rohde & Schwarz R&S FSV Quick Start Manual Download Page 183](http://html.mh-extra.com/html/rohde-and-schwarz/rands-fsv/rands-fsv_quick-start-manual_1477866183.webp)
Brief Introduction to Remote Control
R&S
®
FSVA/FSV
160
Quick Start Guide 1321.3066.02 ─ 05
2. The length specification itself is read out.
3. The trace data itself is read out.
The procedure is required for programming languages that only support struc-
tures with data types of the same type (arrays, such as with Visual Basic),
because the data types of the header and data sections are different in binary
data.
The "VISA" library provides only a mechanism for reading into string buffers. In
order to convert the data into an array of single precision values, the string con-
tents must be copied into a buffer of that type. The following example uses an
operating system function for the copy operation. The function declaration must
be added to a module (
.bas
) as follows:
Array dimensions
The arrays for the measured data are dimensioned so they provide suffi-
cient space for trace data of the R&S
FSVA/FSV (691 measurement
points).
REM ************************************************************************
Public Sub ReadTrace()
'--------- Creating variables ----------------------------------------------
Dim traceData(1400) As Single 'Buffer for floating point binary data
Dim digits As Byte 'Number of characters in
'length specification
Dim traceBytes As Integer 'Len. of trace data in bytes
Dim traceValues As Integer 'No. of meas. values in buff.
Dim BinBuffer as String * 5600 'String buffer for binary data
Dim retCount as Long
asciiResult$ = Space$(28000) 'Buffer for ASCII trace data
result$ = Space$(100) 'Buffer for simple results
startFreq$ = Space$(100) 'Buffer for start frequency
span$ = Space$(100) 'Buffer for span
'--------- Default setting of the R&S FSV ---------------------------------
CALL SetupInstrument 'Default setting
CALL InstrWrite(analyzer,"INIT:CONT OFF")
'Switch to single sweep
CALL InstrWrite(analyzer,"INIT;*WAI") 'Perform sweep with sync
'--------- Defining the frequency range for output -------------------------
CALL InstrWrite(analyzer,"FREQ:STARt?") 'Read start frequency
CALL InstrRead(analyzer,startFreq$, 100, retCount)
startFreq = Val(startFreq$)
CALL InstrWrite(analyzer,"FREQ:SPAN?") 'Read span
Detailed Programming Examples
Summary of Contents for R&S FSV
Page 25: ......