Network Operation and Remote Control
R&S
®
SMA100B
286
User Manual 1178.3834.02 ─ 03
The difference between "Show SCPI Command" and the provided cross-refer-
ence
If you want to enter your settings in a script, or use a remote control program, you must
know the corresponding SCPI command and the exact syntax.
If you need to look up the SCPI command, the instrument offers two ways to figure it
out quickly.
●
"Show SCPI command" (context-sensitive menu)
Displays the SCPI command syntax of a selected parameter including the current
setting value, see
Chapter 11.12, "How to Find Out the SCPI Command Corre-
sponding to the Manual Operation via "Show SCPI Command""
"Copy" function enables you to write a SCPI script conveniently by hand.
●
Instrument help (F1 key)
Opens a help topic that describes the selected parameter or instrument function,
including a cross-reference to the corresponding SCPI command. The reference
leads you to the description of the SCPI command comprising the complete SCPI
syntax, all available setting values, value ranges, etc., see
Find Out the SCPI Command Corresponding to the Manual Operation Using the
Online Help"
Creating and exporting a script file
When the script list is completed, a code generator translates the SCPI commands into
the source code of a proprietary programming language, using a code template. There-
fore, each language requires an appropriate code template. When converted, you can
save the script in a file with an extension corresponding to the programming language.
The R&S
SMA100B provides the following predefined code templates by default:
●
Plain SCPI
Represents SCPI base format, that is ASCII format, saved as text file (
*.txt
).
●
MATLAB
A programming environment, frequently used in signal processing and test and
measurement applications (
*.m
).
You can directly use this format with MATLAB(c) Toolkit. For comprehensive infor-
mation on this topic, refer to the application note
●
NICVI
An ANSI C programming environment designed for measurements and tests (
*.c
).
You can directly use this format with National Instruments LabWindows CVI.
You can also convert a script to a user-specific format. In this case, you need a code
template with the extension
*.expcodetmpl
.
For information on how to select the code template and save the script in a file, see
Chapter 11.11.3, "SCPI Recording Export Settings"
Executing an SCPI script
An SCPI script primarily runs on the controller PC. In addition, you can execute a script
directly on the instrument, by assigning the script to the USER key.
Automating Tasks with Remote Command Scripts