Query Usage
Logic analyzer instructions that are immediately followed by a question mark
(?) are queries. After receiving a query, the logic analyzer parser places the
response in the output buffer. The output message remains in the buffer
until it is read or until another logic analyzer instruction is issued. When
read, the message is transmitted across the bus to the designated listener
(typically a controller).
Query commands are used to find out how the logic analyzer is currently
configured. They are also used to get results of measurements made by the
logic analyzer.
Example This instruction places the current full-screen time for machine 1 in the
output buffer.
:MACHINE1:TWAVEFORM:RANGE?
In order to prevent the loss of data in the output buffer, the output buffer
must be read before the next program message is sent. Sending another
command before reading the result of the query will cause the output buffer
to be cleared and the current response to be lost. This will also generate a
"QUERY UNTERMINATED" error in the error queue. For example, when you
send the query :TWAVEFORM:RANGE? you must follow that with an input
statement. In Basic, this is usually done with an ENTER statement.
In Basic, the input statement, ENTER XXX; Range, passes the value across
the bus to the controller and places it in the variable Range.
Additional details on how to use queries is in the next section of this chapter,
"Receiving Information for the Instrument."
Introduction to Programming
Query Usage
1–10