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:MEASure commands act on the trace in the specified channel.
CALCulate<channel number>:MEASure<meas number(trace number)>:xxxxxxx
The following program does the following:
Presets the analyzer
Create 2 windows
Create 2 Measurements
Change frequency ranges for channels
Turn marker 1 ON for each measurement
To run this program, you need:
An established GPIB interface connection
See Other SCPI Example Programs
GPIB.Write "SYSTem:PReset"
'Create two windows
GPIB.Write ":DISPlay:SPLit 2"
'Create one trace on each window
GPIB.Write ":CALCulate1:PARameter:COUNt 1"
GPIB.Write ":CALCulate2:PARameter:COUNt 1"
'Define the parameter for each trace
GPIB.Write ":CALCulate1:MEASure1:PARameter 'S21'"
GPIB.Write ":CALCulate2:MEASure2:PARameter 'S12'"
'Change each channel's frequency range
GPIB.Write "SENSe1:FREQuency:SPAN 1e9"
GPIB.Write "SENSe2:FREQuency:SPAN 2e9"
'Turn marker 1 ON for each measurement
GPIB.Write "CALCulate1:MEASure1:MARKer:STATe ON"
GPIB.Write "CALCulate2:MEASure2:MARKer:STATe ON"