This Python program does the following:
Presets the analyzer, deleting the default trace
Create 2 windows
Create 2 Measurements
Feed the measurements to windows / traces
Change frequency ranges for channels
Select both measurements
Turn marker 1 ON for each measurement
The following notes explain the basic structure of the SCPI tree on the analyzer:
SOURce: and most SENSe: commands act on the channel that is specified in the command. Channel 1 is default if not specified.
Most DISPlay: commands act on the window and trace specified in the command. Window1 and Trace1 are default if not specified.
CALCulate:
commands act on the selected
measurement in the specified
channel. Select the measurement for each channel using
CALCulate<channel number>:PARameter:SELect <meas name>.
You can select one measurement in each channel.
Traces, Channels, and Windows on the Analyzer
See Other SCPI Example Programs
import pyvisa
as visa |