A Brief Introduction to the SCPI Language
Overview
NOTE
Command Statement Rules Overview
Besides the standard notation of SCPI described above, please remember the following rules in
programming:
• command statements read from left to right
• use either long form or short form of keywords, but do not use both
• no separating space between the keywords, only use a colon to separate keywords of different levels
• always separating a keyword from a variable with a space
• always separating a variable from its unit with a space (if variable has a unit)
Creating Valid Commands
Commands are not case sensitive and there are often many different ways of writing a particular
command. These are examples of valid commands for a given command syntax:
Command Syntax
[SENSe:]BANDwidth[:RESolution] <freq>
MEASure:SPECtrum[n]?
[:SENSe]:DETector[:FUNCtion]
NEGative|POSitive|SAMPle
INITiate:CONTinuous ON|OFF|1|0
168
This Manual:http://www.manuallib.com/agilent/n9062a-signal-analyzer-user-guide.html
The command SENS:FREQU:STAR is not valid because FREQU is neither the
short, nor the long form of the command.
Sample Valid Commands
The following sample commands are all identical. They
all cause the same result.
•
Sense:Band:Res 1700
•
BANDWIDTH:RESOLUTION 1.7e3
•
sens:band 1.7KHZ
•
SENS:band 1.7E3Hz
•
band 1.7kHz
•
bandwidth:RES 1.7e3Hz
•
MEAS:SPEC?
•
Meas:spec?
•
meas:spec3?
The number 3 in the last meas example causes it to
return different results then the commands above it. See
the command description for more information.
•
DET:FUNC neg
•
Detector:Func Pos
The sample commands below are identical.
•
INIT:CONT ON
•
init:continuous 1