Agilent Technologies 86121A User Manual page 93

Wdm channel analyzer
Table of Contents

Advertisement

4-26 Reviewing SCPI Syntax Rules
Program message terminator
The string of instructions sent to the instrument are
executed after the instruction terminator is received.
The terminator may be either a new-line (NL) charac-
ter, the End-Or-Identify (EOI) line asserted, or a combi-
nation of the two. All three ways are equivalent.
Asserting the EOI sets the EOI control line low on the
last byte of the data message. The NL character is an
ASCII linefeed (decimal 10). The NL terminator has the
same function as an EOS (End Of String) and EOT
(End Of Text) terminator.
Querying data
Data is requested from the instrument using a query.
Queries can be used to find out how the instrument is
currently configured. They are also used to get results
of measurements made by the instrument, with the
query actually activating the measurement. String
responses are returned as upper-case letters.
Queries usually take the form of a command followed by
a question mark (?). After receiving a query, the instru-
ment places the answer in its output queue. The answer
remains in the output queue until it is read or another
command is issued. For example, the query
OUTPUT 720;":CALCULATE2:POINTS?"
places the number of points in the data set in the out-
put queue. In HP BASIC, the controller input state-
ment:
ENTER 720;Range
passes the value across the bus to the controller and
places it in the variable Range. A newline character is
appended to the response.
Sending another command or query before reading the
result of a query causes the output queue to be cleared
and the current response to be lost. This also generates
an error in the error queue.
The output of the instrument may be numeric or char-
acter data depending on what is queried. Refer to the
specific commands for the formats and types of data
returned from queries.

Advertisement

Table of Contents
loading

Table of Contents