Input And Output Buffers - Agilent Technologies 8560E User Manual

Agilent technologies 8560 e-series and ec-series spectrum analyzers
Table of Contents

Advertisement

Programming

Input and Output Buffers

Input and Output Buffers
Features of the 8560 E-Series and EC-Series include the input and
output data buffers. This section describes how to take advantage of the
buffers and how to avoid potential programming pitfalls.
Benefits of an Output Buffer
The 64-character input buffer allows you to send several data queries to
the spectrum analyzer using only one HP BASIC OUTPUT statement.
The 64-character output-data buffer holds queried values so that you
can read them into variables using only one ENTER statement. This is
a more efficient method than using one OUTPUT statement per query
and one ENTER statement per value read. See Example 1.
E
1
XAMPLE
10
OUTPUT 718;"IP;SNGLS;MKPX 6DB;MKPT -65DB;FA 270MHZ;FB
1200MHZ;TS;"
20
OUTPUT 718;"MKPK HI;MKD;MKPK NR;MKF?;MKA?;"
30
ENTER 718 USING "K";Mkf,Mka
40
PRINT Mkf,Mka
50
END
Example 1 reads the difference in frequency and amplitude between
two peaks, then enters the values into variables. Note the order of the
queries and entries. The first query is the first value to come out of the
output-data buffer; you read the values into variables in the same order
that you query the spectrum analyzer.
Whenever you execute a query, be sure to read that value out. If you do
not read it out, you will get that value returned for your next query. See
Example 2.
E
2
XAMPLE
10
OUTPUT 718;"CF?;"
20
OUTPUT 718;"AT UP;RL?;"
30
ENTER 718;Rl
40
PRINT Rl
50
END
In Example 2, even though you wanted to read the reference level, the
printed value is equal to the center frequency. The center frequency had
been left in the output-data buffer and was the first value to come out of
the buffer.
316
Chapter 5

Advertisement

Table of Contents
loading

Table of Contents