l
’
Note
!b
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
:MACHINEl:ASSIGN?,
you must follow that query with an input
statement. In BASIC, this is usually done with the ENTER statement.
The format specification for handling the response messages is dependent
on both the controller and the programming language.
Response Header
The format of the returned ASCII string depends on the current settings
Options
of the SYSTEM HEADER and
LONGFORM
commands. The general
format is:
c instruction header
>
-z
space
>
c data
>
c terminator
>
The header identifies the data that follows (the parameters) and is
controlled by issuing a :SYSTEM:HEADER ON/OFF command. If the
state of the header command is OFF, only the data is returned by the
query.
The format of the header is controlled by the :SYSTEM:LONGFORM
ON/OFF command. If longform is OFF, the header will be in its
shortform and the header will vary in length depending on the particular
query. The separator between the header and the data always consists of
one space.
The following examples show some possible responses for a
:MACHINEl:SFORMAT:THRESHOLD2?
query:
l
with HEADER OFF:
<data
r
-z
terminator
>
l
with HEADER ON and
LONGFORM
OFF:
:MACHl:SFOR:THR2
<space
>
<data> c terminator>
l with HEADER ON and
LONGFORM
ON:
:MACHINE1:SFORMAT:THF?ESHOLD2
<space
>
cdata
>
<terminator
>
HP
1650B/HP
16618
Programming Reference
Introduction to Programming an Instrument
1-13