Multiple Commands In A Message; Moving Among Subsystems - Agilent Technologies 66311A User Manual

Table of Contents

Advertisement

6 - Introduction to Programming

Multiple Commands in a Message

Multiple SCPI commands can be combined and sent as a single message with one message terminator.
There are two important considerations when sending several commands within a single message:
♦ Use a semicolon to separate commands within a message.
♦ There is an implied header path that affects how commands are interpreted by the dc source.
The header path can be thought of as a string that gets inserted before each command within a message.
For the first command in a message, the header path is a null string. For each subsequent command the
header path is defined as the characters that make up the headers of the previous command in the
message up to and including the last colon separator. An example of a message with two commands is:
OUTP:STAT ON;PROT:DEL 2
which shows the use of the semicolon separating the two commands, and also illustrates the header path
concept. Note that with the second command, the leading header "OUTP" was omitted because after the
"OUTP:STAT ON" command, the header path was became defined as "OUTP" and thus the instrument
interpreted the second command as:
OUTP:PROT:DEL 2
In fact, it would have been syntactically incorrect to include the "OUTP" explicitly in the second
command, since the result after combining it with the header path would be:
OUTP:OUTP:PROT:DEL 2
which is incorrect.

Moving Among Subsystems

In order to combine commands from different subsystems, you need to be able to reset the header path to
a null string within a message. You do this by beginning the command with a colon (:), which discards
any previous header path. For example, you could clear the output protection and check the status of the
Operation Condition register in one message by using a root specifier as follows:
OUTPut:PROTection:CLEAr;:STATus:OPERation:CONDition?
50
ROOT
[:STATe]
:OUTPut
:DFI
:PON
:PROTection
:OPERation
:STATus
Figure 6-1. Partial Command Tree
[:STATe]
:SOURce
:STATe
:CLEar
:DELay
[:EVEN] ?
:CONDition?

Advertisement

Table of Contents
loading

Table of Contents