Network and Remote Operation
R&S
®
FSW
782
User Manual 1173.9411.02 ─ 43
d) From the context menu, select "Paste".
6. Select "Save As" to store the changes to the script.
How to check a SCPI script
The easiest way to check a script is to execute it, for example in the auxiliary tool IEC-
WIN, which is provided with the R&S
The tool shows an error message if a command could not be executed.
Some suggestions on how you can check and improve a recorded SCPI script:
●
Search and remove missing command entries.
If a configured setting or performed function does not have a corresponding com-
mand,
:SYST:INF:SCPI 'SCPI command not available'
is entered in the
list instead.
●
Remove unnecessary commands written after a preset.
●
Rearrange the commands to a reasonable order. For example, if you move a
STATe
command to the end of your script, you can avoid intermediate calculations
of the signal.
●
Check the script for completeness by comparing its results with the modified set-
tings in manual mode.
How to export a SCPI script
When you save a command list to a file, only the recorded commands are stored in a
text file. However, to execute a script in an external programming environment, it
requires additional header data according to the specific format.
1. On the toolbar, select the SCPI Recorder icon.
The SCPI Recorder dialog box with the currently recorded command list is dis-
played.
2. Select "Export".
3. Define a file name and storage location for the script file.
4. Select the "File Type" which defines the format of the script.
5. Select "Save".
A script with the required header data for the selected format is stored to a file.
13.4.5
Example for a Recorded SCPI Script
The following example shows a recorded SCPI script in python format. The script con-
figures the ACLR measurement example described in
Example 1 – ACPR Measurement on a CDMA2000 Signal"
Automating Tasks with Remote Command Scripts