62 Chapter2
Programming Fundamentals
SCPI Language Basics
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 keywords and Syntax
A typical command is made up of keywords set off by colons. The
keywords are followed by parameters that can be followed by optional
units.
Example: TRIGger:LEVel:EXT1 2.5V
The instrument does not distinguish between upper and lower case
letters. In the documentation, upper case letters indicate the short form
of the keyword. The upper and lower case letters, together, indicate the
long form of the keyword. Either form may be used in the command.
Example: Trig:LEVEL:EXT1 2 is the same as trigger:Lev:ext1 2v.
Command Syntax Sample Valid Commands
[SENSe:]BANDwidth[:RESolution] <freq> The following sample commands are all
identical. They will 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
MEASure:SPECtrum[n]? • MEAS:SPEC?
• Meas:spec?
• meas:spec3?
The number 3 in the last meas example causes
it to return different results thenthe commands
above it. See the command description for more
information.
[SENSe:]CPOWer:AVERage:TCONtrol
EXPonential|NORMal|REPeat
• CPOW:AVER:TCON EXP
• CPOWER:aver:tcon Normal
INITiate:CONTinuous ON|OFF|1|0 The sample commands below are identical.
• INIT:CONT ON
• init:continuous 1