Channels, Windows, and Measurements using SCPI


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.


The following program does the following:

To run this program, you need:

See Other SCPI Example Programs

Example

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"