
10-4
IM 704610-01E
Writing Consecutive Commands
Groups
A group of commands having common compound
headers with hierarchically layered structure is called a
group. Smaller groups can be nested inside of larger
ones.
Example: Example Group of commands related to
sampling
SAMPLE?
SAMPLE:ARMING
SAMPLE:ARMING:DELAY:TIME
SAMPLE:ARMING:SLOPE
SAMPLE:ARMING:SOURCE
SAMPLE:GATE?
SAMPLE:GATE:TIME
SAMPLE:INHIBIT?
SAMPLE:INHIBIT:POLARITY
SAMPLE:INHIBIT:STATE
Writing Consecutive Commands of the Same
Group
The instrument remembers which layer the command
being executed is on, and performs analysis based on
the assumption that the next command sent belongs to
the same layer. Therefore the common headers for
commands of the same group can be omitted.
Example:
INPUT:DATA:TRIG:MODE MAN;
LEVEL 1.000V<PMT>
Writing Consecutive Commands from Different
Groups
To write commands from different groups, add a colon
(
:
) to the front of the new group header.
Example:
MEASURE:FUNCTION DTOC;:
DISPLAY:SCALE R10<PMT>
When Concatenating Simple Headers
If a simple header follows another command, a colon
(
:
) is placed in front of the simple header.
Example:
MEASURE:FUNCTION DTOC;:
START<PMT>
Writing Consecutive Common Commands
Layers do not apply to commands defined as common
by IEEE 488.2-1992. Colons (
:
) are not needed
before a common command.
Example:
MEASURE:FUNCTION DTOC;*CLS<PMT>
10.1 Program Format
Separating Commands with
When commands are separated with a terminator, it
means two program messages are sent. Therefore
even with consecutive commands of the same group,
the common header cannot be omitted.
Example:
MEASURE:FUNCTION DTOC<PMT>
MEASURE:SPEED 1.0<PMT>
Top Level Query
A query with a question mark (
?
) added to the top level
command of a group appearing for the first time is
called a top level query. When executing a top level
query, all settings that can be set in that group can be
received all at once. With groups with three layers or
more, there are ones in which all lower layers are
output.
Example:
SAMPLE?<PMT> -> :SAMPLE:ARMING:
SOURCE AUTO;:TIME 100.0E-03;:
SAMPLE:INHIBIT:STATE 0
The response to a top level query can be sent as-is as
a program message to the instrument. When sending,
the settings returned by the top level query can be
edited if necessary and reused in the new program
message. However, top level queries do not receive
currently unused settings in the response. Please note
that all information for that group will not necessarily be
output as a response.
Rules for Interpreting Headers
The instrument interprets received headers according
to the following rules.
• Mnemonics are case insensitive.
Example
“
MEASure
” can also be written as
“
measure
” or “
Measure
.”
• Lowercase letters can be omitted.
Example
“
MEASure
” can also be written as
“
MEASU
” or “
MEAS
.”
• The question mark (
?
) at the end of a header
identifies it as a query. The question mark cannot
be omitted.
Example
“
MEASure
?” -> Abbreviated format:
[
MEAS?
]
• If the x (number) on the end of the mnemonic is
omitted, it is interpreted as x=1.
Example
If “
FILTer
” is written as “
FILT
,” it
means “
FILTer1
.”
• The section enclosed by braces ([ ]) can be omitted.
Example
INPut:PLL[:MODE] 1
INPut:PLL 1
also allowed
However, for a top level query, the final part cannot be
omitted.