SCPI Programming Examples

ARB Waveform in Single-Channel Configuration

ARB Waveform in Single-Channel Configuration with External Trigger

ARB Waveform in Single-Channel Configuration

The SCPI programming example below can be used for loading and playing an ARB waveform in a single-channel configuration.

// Optional. Resets the system to its default state.

*RST

// Optional. Displays the instrument information.

*IDN?

// Optional. Check if any SCPI errors are in the Error Queue (if there are errors, continue to query until No Error is returned.

:SYST:ERR?

// Set the desired frequency.

:SOURce:RF1:FREQuency:CW 5.2GHz

// Set the desired power level.

:SOURce:RF1:POWer:AMPLitude 0

// Enable the RF Output.

:SOURce:RF1:OUTPut:STATe ON

// Select the waveform to play. This example uses a waveform provided in the Examples folder on the instrument. Copy the waveform

// you want to play onto the instrument using a network file transfer, a USB memory device, or via the MMEMory:DATA SCPI command. It is

// recommended you use the Waveforms folder which is the default folder for waveform operations.

:SOURce:GROup1:SIGNal1:WAVeform:SELect "..\Examples\5GNR_1CC_FR1_30kHz_SCS_100MHz_256QAM_DC Punctured.wfm"

// It is always good practice to query for errors after selecting the waveform to ensure the file correctly transferred to the signal generator's

// internal memory.

:SYST:ERR?

// Enable the waveform.

:SOURce:GROup1:SIGNal1:STATe ON

// For good measure check for errors here at the end of the SCPI example.

:SYST:ERR?

ARB Waveform in Single-Channel Configuration with External Trigger

The SCPI programming example below can be used for loading and playing an ARB waveform in a single-channel configuration, using an external trigger.

// Optional. Resets the system to its default state.

*RST

// Optional. Displays the instrument information.

*IDN?

// Optional. Check if any SCPI errors are in the Error Queue (if there are errors, continue to query until No Error is returned.

:SYST:ERR?

// Set the desired frequency.

:SOURce:RF1:FREQuency:CW 5.2GHz

// Set the desired power level.

:SOURce:RF1:POWer:AMPLitude 0

// Enable the RF Output.

:SOURce:RF1:OUTPut:STATe ON

// Select the waveform to play. This example uses a waveform provided in the Examples folder on the instrument. Copy the waveform

// you want to play onto the instrument using a network file transfer, a USB memory device, or via the MMEMory:DATA SCPI command. It is

// recommended you use the Waveforms folder which is the default folder for waveform operations.

:SOURce:GROup1:SIGNal1:WAVeform:SELect "..\Examples\5GNR_1CC_FR1_30kHz_SCS_100MHz_256QAM_DC Punctured.wfm"

// It is always good practice to query for errors after selecting the waveform to ensure the file correctly transferred to the signal generator's

// internal memory.

:SYST:ERR?

// Set the waveform trigger type to Continuous; meaning the waveform will play continuously when the trigger condition is met.

:SOURce:GROup1:SIGNal1:WAVeform:TRIGger:TYPE CONTinuous

// Set the trigger to external. The waveform will play when a TTL high level is detected on the External Trigger connector.

:SOURce:GROup1:SIGNal1:WAVeform:TRIGger:SOURce EXTernal

// Enable the waveform.

:SOURce:GROup1:SIGNal1:STATe ON

// For good measure check for errors here at the end of the SCPI example.

:SYST:ERR?