12
Agilent X-Series Signal Generators SCPI Command Reference
SCPI Basics
SCPI Basics
Program Messages
The following commands will be used to demonstrate the creation of program messages:
[:SOURce]:FREQuency:STARt
[:SOURce]:FREQuency:STOP
[:SOURce]:FREQuency[:CW]
[:SOURce]:POWer[:LEVel]:OFFSet
Example 1
:FREQuency:STARt 500MHz;STOP 1000MHz
This program message is correct and will not cause errors;
STARt
and
STOP
are at the same path
level. It is equivalent to sending the following message:
FREQuency:STARt 500MHz;FREQuency:STOP 1000MHz
Example 2
:POWer 10DBM;:OFFSet 5DB
This program message will result in an error. The message makes use of the default
POWer[:LEVel]
node (root command). When using a default node, there is no change to the current
path position. Since there is no command
OFFSet
at the root level, an error results.
The following example shows the correct syntax for this program message:
:POWer 10DBM;:POWer:OFFSet 5DB
Example 3
:
POWer:OFFSet 5DB;POWer 10DBM
This program message results in a command error. The path is dropped one level at each colon. The
first half of the message drops the command path to the lower level command
OFFSet
;
POWer
does
not exist at this level.
The
POWer 10DBM
command is missing the leading colon and when sent, it causes confusion because
the signal generator cannot find
POWer
at the
POWer:OFFSet
level. By adding the leading colon, the
current path is reset to the root. The following shows the correct program message:
:POWer:OFFSet 5DB;:POWer 10DBM
Example 4
FREQ 500MHz;POW 4DBM
In this example, the keyword short form is used. The program message is correct because it utilizes
the default nodes of
:FREQ[:CW]
and
:POW[:LEVel]
. Since default nodes do not affect the current
path, it is not necessary to use a leading colon before
FREQ
or
POW
.