HP (Hewlett-Packard) 86140A TV Cables User Manual


 
4-10
Remote Operation
Getting Started
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
obtain results of measurements made by the instrument, with the query actu-
ally activating the measurement. String responses are returned as uppercase
letters.
Queries usually take the form of a command followed by a question mark (?).
After receiving a query, the instrument 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 723;:CALC:MARK1:X?
places the wavelength of marker 1 in the output queue. In HP BASIC, the con-
troller input statement
ENTER 720;Range
passes the value across the bus to the controller and places it in the variable
Range. 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 instru-
ment may be numeric or character data depending on what is queried. Refer
to the specific commands for the formats and types of data returned from que-
ries. You can send multiple queries to the instrument within a single program
message, but you must also read them back within a single program message.
This can be accomplished by either reading them back into a string variable or
into multiple numeric variables. When you read the result of multiple queries
into string variables, each response is separated by a semicolon.
book.book Page 10 Monday, January 31, 2000 10:34 AM