Technical data

72 Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
3 Introduction to Programming
Receiving Information from the Oscilloscope
After receiving a query (a command header followed by a question mark),
the oscilloscope 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 interface to the
computer.
The input statement for receiving a response message from an
oscilloscope's output queue typically has two parameters; the device
address and a format specification for handling the response message. For
example, with the VISA COM library, to read the result of the query
command :CHANNEL1:INPUT? you would use the ReadString() method:
Dim strSetting As String
myScope.WriteString ":CHANnel1:INPut?"
strSetting = myScope.ReadString
This would enter the current setting for the channel 1 coupling in the
string variable strSetting.
All results for queries sent in a program message must be read before
another program message is sent. For example, when you send the query
:MEASURE:RISETIME?, you must follow that query with an input
statement.
The format specification for handling response messages depends on both
the computer and the programming language.
NOTE
Handle Queries Properly
If you send another command or query before reading the result of a query, the output
buffer will be cleared and the current response will be lost. This will also generate 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.