Programmer’s Guide
9-7
Introduction to SCPI
Sending Multiple Commands
Sending Multiple Commands
Multiple commands can be sent within a single program message by
separating the commands with semicolons. For example, the following
program message — sent within an HP BASIC
OUTPUT
statement —
turns on the marker reference and moves the main marker to the highest
peak on the trace:
OUTPUT 716;"CALCULATE:MARKER:MODE
RELATIVE;:CALCULATE:MARKER:MAXIMUM"
One of the analyzer's command parser main functions is to keep track of
a program message's position in the command tree. This allows the
previous program message to be simplified. Taking advantage of this
parser function, the simpler equivalent program message is:
OUTPUT 716;"CALCULATE:MARKER:MODE RELATIVE;MAXIMUM"
In the first version of the program message, the semicolon that separates
the two commands is followed by a colon. Whenever this occurs, the
command parser is reset to the base of the command tree. As a result,
the next command is only valid if it includes the entire mnemonic path
from the base of the tree.
In the second version of the program message, the semicolon that
separates the two commands is not followed by a colon. Whenever this
occurs, the command parser assumes that the mnemonics of the second
command arise from the same branch of the tree as the final mnemonic
of the preceding command.
MODE
, the final mnemonic of the first
command, arises from the
MARKER
branch. So
MAXIMUM
, the first
mnemonic of the second command, is also assumed to arise from the
MARKER
branch.
The following is a longer series of commands — again sent within
HP BASIC
OUTPUT
statements — that can be combined into a single
program message:
OUTPUT 716;"CALCULATE:MARKER:STATE ON"
OUTPUT 716;"CALCULATE:MARKER:MODE RELATIVE"
OUTPUT 716;"CALCULATE:MARKER:MAXIMUM"
OUTPUT 716;"CALCULATE:MARKER:FUNCTION:TRACKING ON"
The single program message is:
OUTPUT 716;"CALCULATE:MARKER:STATE ON;MODE
RELATIVE;MAXIMUM;FUNCTION:TRACKING ON"
Summary of Contents for 8712ES
Page 11: ...1 1 1 Introduction to GPIB Programming ...
Page 27: ...2 1 2 Synchronizing the Analyzer and a Controller ...
Page 36: ...3 1 3 Passing Control ...
Page 39: ...4 1 4 Data Types and Encoding ...
Page 46: ...5 1 5 Using Status Registers ...
Page 71: ...6 1 6 Trace Data Transfers ...
Page 98: ...6 28 Programmer sGuide Trace Data Transfers Internal Measurement Arrays ...
Page 99: ...7 1 7 Using Graphics ...
Page 105: ...8 1 8 Front Panel Keycodes ...
Page 111: ...9 1 9 Introduction to SCPI ...
Page 129: ...10 1 10 Menu Map with SCPI Commands ...
Page 268: ...12 1 12 SCPI Conformance Information ...
Page 290: ...13 1 13 SCPI Error Messages ...