Query Headers - Agilent Technologies Infiniium 90000 Series Programmer's Manual

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

3
Introduction to Programming

Query Headers

A command header immediately followed by a question mark (?) is a
query. After receiving a query, the oscilloscope interrogates the requested
subsystem and places the answer in its output queue. The answer remains
in the output queue until it is read or until another command is issued.
When read, the answer is transmitted across the bus to the designated
listener (typically a computer).
For example, with VISA COM library and Visual Basic for Applications
(VBA) language, the query:
myScope.WriteString ":TIMEBASE:RANGE?"
places the current time base setting in the output queue.
The computer input statement:
varRange = myScope.ReadNumber
passes the value across the bus to the computer and places it in the
variablevar Range.
You can use queries to find out how the oscilloscope is currently
configured and to get results of measurements made by the oscilloscope.
For example, the query:
:MEASURE:RISETIME?
tells the oscilloscope to measure the rise time of your waveform and place
the result in the output queue.
The output queue must be read before the next program message is sent.
For example, when you send the query :MEASURE:RISETIME?, you must
follow it with an input statement.
With the VISA COM library and Visual Basic for Applications (VBA)
language, this is usually done with a ReadString() or ReadNumber()
method. These methods read the result of the query and place the result
in a specified variable.
Handle Queries Properly
N O T E
If you send another command or query before reading the result of a query, the output
buffer is cleared and the current response is lost. This also generates a query-interrupted
error in the error queue. If you execute an input statement before you send a query, it will
cause the computer to wait indefinitely.
64
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents