EasyManuals Logo

Keysight x-series User Manual

Keysight x-series
2852 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #2618 background imageLoading...
Page #2618 background image
7 Save/Recall/Print
7.3 Save
Type Extension Details
Text
.txt
Default
Python
Script
.py
Generates a Python script that can be executed in Python
environment.. For details, see "Saving a SCPI Recording as a Python
Script" on page 2618
The saved file content does not include the label of each recorded entry, just the
SCPI mnemonics. The file is saved to the following folder:
<user_name>:\Documents\Keysight\Infrastructure\ScpiRecording folder
Saving a SCPI Recording as a Python Script
To execute the generated Python script:
Install the Python version required by PyVisa
Download the PyVisa library from: https://pypi.org/project/PyVISA/
Modify the connection string, to specify your instrument’s connection string
Example Script
An example of the generated script is shown below.
# _install location: https://pypi.org/project/PyVISA/
import pyvisa
import re
# connected instrument
_inst = ''
# SCPI Recording commands and queries
# Add/Modify the instrument address to execute the script
_connectionString = 'your instrument connection string here'
#Example SCPI Recording Entries
_recordingEntries = ['Active Mode & Measurement'|':INST:CONF:SA:SANalyzer',
'Query Operation Complete'|'*OPC?',
'Active Mode & Measurement'|':INST:CONF:SA:SANalyzer',
'Query Operation Complete'|'*OPC?',
'Center Frequency'|':SENSe:FREQuency:CENTer 12000000000',
'Freq Offset'|':SENSe:FREQuency:OFFSet 10',
Spectrum Analyzer Mode User's &Programmer's Reference 2618

Table of Contents

Other manuals for Keysight x-series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight x-series and is the answer not in the manual?

Keysight x-series Specifications

General IconGeneral
Analysis BandwidthUp to 1 GHz (depending on model)
Real-Time BandwidthUp to 1 GHz (depending on model)
Form FactorBenchtop
ConnectivityLAN, USB, GPIB
Resolution Bandwidth1 Hz to 10 MHz (depending on model)

Related product manuals