
Multiple Queries
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. For example, you could
read the result of the query :SYSTEM:HEADER?;LONGFORM? into
the string variable
with the command:
ENTER XXX;
When you read the result of multiple queries into string variables, each
response is separated by a semicolon. For example, the response of the
query :SYSTEM:HEADER?:LONGFORM? with HEADER and
on would be:
1;:SYSTEM:LONGFORM 1
If you do not need to see the headers when the numeric values are
returned, then you could use following program message to read the query
:SYSTEM:HEADERS?;LONGFORM? into multiple numeric variables:
ENTER XXX;
Result2
N o t e
When you are receiving numeric data into numeric variables, the headers
should be turned off. Otherwise the headers may cause misinterpretation
of returned data.
Instrument Status
Status registers track the current status of the instrument. By checking the
instrument status, you can find out whether an operation has been
completed, whether the instrument is receiving triggers, and more. The
appendix “Status Reporting” explains how to check the status of the
instrument,
Introduction to Programming an Instrument
1-18
HP
16518
Programming Reference