Agilent Technologies 8560E User Manual page 317

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

Advertisement

Programming
Input and Output Buffers
If you are entering multiple values into multiple variables with one
ENTER statement, use a "K" format with the ENTER statement. The
spectrum analyzer separates queried values by a line feed with an
end-or-identify (EOI) asserted; "K" format recognizes that a new value
starts after each line feed with EOI. If you omit the USING statement,
the ENTER statement will terminate on the first EOI encountered and
generate an error.
Buffer Space
The maximum number of characters that the output-data buffer can
hold is 64. In Example 1, the query MKD? filled seven character spaces
in the output-data buffer. The returned value, −33.34, fills six spaces;
the line feed that separates this value from the next one fills the
seventh space. This method is used to enter all queries into the
output-data buffer. You can continue to query the analyzer until the
queries fill all 64 spaces. The input buffer fills similarly. The query AT?
fills four spaces in the input data buffer. The input buffer can hold as
many commands as will fill its 64-character capacity. The returned
frequency value is not dependent on the current resolution bandwidth.
Preventing Timeouts
A program can pause unexpectedly when the output data buffer is
completely filled with query values, the input buffer is completely filled
with commands, and the spectrum analyzer is currently executing a
query. Under this set of conditions, the program will pause indefinitely.
The spectrum analyzer is trying to complete the query, but there is
simply no more room in the output-data buffer for any more query data
and no place to hold the query in the input buffer. If you have a timeout
statement in the program, a timeout will occur. To prevent this
situation, do not allow query values or commands to stack up in the
buffers. Query for only a few values, then read them into variables
before you send more queries. If you must leave the output buffer full,
do not send more than 64 characters of commands with one OUTPUT
statement.
A program can also pause unexpectedly while the spectrum analyzer is
executing a command that takes a long time to complete. Consider
executing the take-sweep (TS) command when the selected sweep time
is equal to 100 seconds. In this case, the TS command requires 100
seconds before it is completed. While this command is executing, the
input-data buffer fills with 64 characters of commands. When the buffer
is full, if there are any remaining commands in that OUTPUT
statement, the program will pause. It will start again when the TS
command is complete; the spectrum analyzer can then begin processing
the commands in the buffer, and the remaining commands in the
OUTPUT statement will move into the input data buffer.
Chapter 5
317

Advertisement

Table of Contents
loading

Table of Contents