BIT 4886 051010
4-17
4.6.4.3
QUERY INDICATOR
The question mark (?) following a keyword is a query indicator. This changes the command into
a query. If there is more than one keyword in the command, the query indicator follows the last
keyword. (e.g.,
VOLT?
and
MEAS:CURR?
).
4.6.4.4
DATA
Some commands require data to accompany the keyword either in the form of a numeric value
or character string. Data always follows the last keyword of a command or query (e.g.,
VOLT:LEV:TRIG 14
or
SOUR:VOLT? MAX
.
4.6.4.5
DATA SEPARATOR
Data must be separated from the last keyword by a space (e.g.,
VOLT:LEV:TRIG 14
or
SOUR:VOLT? MAX
.
4.6.4.6
MESSAGE UNIT SEPARATOR
When two or more message units are combined in a program message, they must be separated
by a semicolon (;) (e.g.,
VOLT 15;MEAS:VOLT?
and
CURR 12;CURR:TRIG 12.5
).
4.6.4.7
ROOT SPECIFIER
The root specifier is a colon (:) that precedes the first keyword of a program message. This
places the parser at the root (top left, Figure 4-5) of the command tree. Note the difference
between using the colon as a keyword separator and a root specifier in the following examples:
VOLT:LEV:IMM 16
The root specifier is not necessary for the first keyword and has been
omitted. Both colons are keyword separators.
:CURR:LEV:IMM 4
Even though it is not required, it is still correct to include the root specifier
(first colon). The other two are keyword separators.
VOLT:LEV 6;:CURR:LEV 15
The root specifier for VOLT is not necessary because it is the
first keyword in the string and has not been included. The second colon is the root specifier for
CURR and is required; if it is missing an error will result. The first and third colons are keyword
separators.
:INIT ON;:TRIG;:MEAS:CURR?;VOLT?
The first three colons are root specifiers. The
fourth colon is a keyword separator.
4.6.4.8
MESSAGE TERMINATOR
The message terminator defines the end of a message. Three message terminators are permit-
ted:
• new line (
<NL>
), ASCII 10 (decimal) or 0A (hex)
• carriage return (
<CR>
), ASCII 13 (decimal) or 0D (hex)
• both of the above (
<CR> <NL>
). If both are sent, the second is null and has no effect.
Your GPIB interface card software will automatically send a message terminator. For example,
the HP BASIC OUTPUT statement inserts
<NL>
after the last data byte. When binary data is