![Rohde & Schwarz 1307.9002K03 Quick Start Manual Download Page 170](http://html1.mh-extra.com/html/rohde-and-schwarz/1307-9002k03/1307-9002k03_quick-start-manual_1477765170.webp)
Controlling the R&S
FSVA/FSV Remotely
R&S
®
FSVA/FSV
155
Quick Start Guide 1321.3066.02 ─ 06
CALL InstrRead(analyzer, result$, 100, retCount)
Debug.Print "Phase Noise [dBc/Hz]: "; result$
'--------- Measuring the noise --------------------------------------------
CALL InstrWrite(analyzer,"CALC:MARK:X 99.96MHz")
'Position marker 1
CALL InstrWrite(analyzer,"CALC:MARK:FUNC:NOIS:RES?")
'Query and output result
result$ = Space$(100)
CALL InstrRead(analyzer, result$, 100, retCount)
Print "Noise [dBm/Hz]: "; result$
END SUB
REM ************************************************************************
8.3.2.3
Reading Out Trace Data
In the following example, the trace data obtained with the default setting is read
from the instrument and displayed in a list on the screen. Readout occurs first in
binary format and then in ASCII format, once with the span > 0 and once with the
span = 0.
In binary format, the header of the message with the length specification is evalu-
ated and used to calculate the x-axis values.
In ASCII format, merely the list of level values is output.
Binary data is read out in three steps:
1. The number of digits in the length specification is read out.
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:
Brief Introduction to Remote Control