Signal Generator


Functionality overview

Signal generator commands control Red Pitaya’s fast analog outputs (DACs) for waveform generation. These commands support continuous signals, burst mode, frequency sweeps, and arbitrary waveform generation (AWG) with precise triggering and synchronization capabilities.

Key generation modes:

  • Continuous - Generate signals indefinitely until stopped

  • Burst - Generate a specific number of signal periods with controlled repetition

  • Sweep - Linear frequency sweep between two frequencies over specified time

  • Arbitrary - Generate custom waveforms defined by user data (16384 samples)

Important notes

  • For STEMlab 125-14 4-Input, the commands in this chapter are not applicable.

  • Generation trigger is independent from acquisition trigger.

  • Outputs must be enabled (OUTPUT:STATE ON) before triggering generation.

  • AWG expects exactly 16384 samples per waveform period.

  • Frequency range: 1 Hz to 50 MHz (board dependent).

  • For detailed programming guidance, see SCPI generation section in the introduction.

Code examples

Here are some examples of how to use the signal generation commands on Red Pitaya:

Parameters and command tables

Generator control

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <state> = {ON,OFF} Default: OFF

  • <enable> = {true, false} Default: false

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

GEN:RST



C++: rp_GenReset()

Python: rp_GenReset()

Stops the generation and sets all generator parameters to default values.



1.04-18 and up

PHAS:ALIGN



C++: rp_GenSynchronise()

Python: rp_GenSynchronise()

Synchronously triggers the generation of both fast analog outputs immediately.
The signal phase is aligned.
(Same as SOUR:TRig:INT)

1.04-18 and up

OUTPUT<n>:STATE <state>
Examples:
OUTPUT1:STATE ON

C++: rp_GenOutEnable(rp_channel_t channel)
rp_GenOutDisable(rp_channel_t channel)
Python: rp_GenOutEnable(<channel>)
rp_GenOutDisable(<channel>)
Enable/disable supplying voltage to the specified fast analog output. When enabled,
the signal does not start generating, but the initial voltage value
(SOUR<n>:INITValue, rp_GenSetInitGenValue) appears on the fast analog output.

1.04-18 and up

OUTPUT<n>:STATE? > <state>
Examples:
OUTPUT1:STATE? > ON

C++: rp_GenOutIsEnabled(rp_channel_t channel, bool *value)

Python: rp_GenOutIsEnabled(<channel>)

Get the enable/disable supply voltage status of the specified fast analog output.



1.04-18 and up

OUTPUT:STATE <state>
Examples:
OUTPUT:STATE ON

C++: rp_GenOutEnableSync(bool enable)

Python: rp_GenOutEnableSync(<enable>)

Enable/disable supplying voltage to both fast analog outputs. When enabled, the signal
does not start generating, but the initial voltage value (SOUR<n>:INITValue,
rp_GenSetInitGenValue) apperas on both fast analog outputs.

1.04-18 and up

Generator trigger

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <state> = {ON,OFF} Default: OFF

  • <utime> = {value in us} Default: 500

  • <trigger> = {EXT_PE, EXT_NE, INT, GATED} Default: INT

    • EXT = External

    • INT = Internal

    • GATED = gated busts

  • <enable> = {true, false} Default: false

Available Jupyter and API macros:

  • Generator trigger source - RP_GEN_TRIG_SRC_INTERNAL, RP_GEN_TRIG_SRC_EXT_PE, RP_GEN_TRIG_SRC_EXT_NE

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

SOUR<n>:TRig:SOUR <trigger>
Examples:
SOUR1:TRig:SOUR EXT_PE

C++: rp_GenTriggerSource(rp_channel_t channel, rp_trig_src_t src)

Python: rp_GenTriggerSource(<channel>, <src>)

Set the trigger source for the selected signal (either internal or external).
The external trigger must be a 3V3 CMOS signal.


1.04-18 and up

SOUR<n>:TRig:SOUR? > <trigger>
Examples:
SOUR1:TRig:SOUR? > EXT_PE

C++: rp_GenGetTriggerSource(rp_channel_t channel, rp_trig_src_t *src)

Python: rp_GenGetTriggerSource(<channel>)

Get the trigger source setting.

1.04-18 and up

-



C++: rp_GenResetTrigger(rp_channel_t channel)

Python: rp_GenResetTrigger(<channel>)

Reset generator settings for the specified fast analog output.

1.04-18 and up

SOUR:TRig:INT
Examples:
SOUR:TRig:INT

C++: rp_GenSynchronise()

Python: rp_GenSynchronise()

Synchronously triggers the generation of both fast analog outputs immediately.
The signal phase is aligned.
The command resets the FPGA and the signal starts to be generated from the beginning.

1.04-18 and up

SOUR<n>:TRig:INT
Examples:
SOUR1:TRig:INT

C++: rp_GenResetTrigger(rp_channel_t channel)

Python: rp_GenResetTrigger(<channel>)

Triggers the generation of the specified fast analog output immediately.
The command resets the FPGA and the signal starts to be generated from the beginning.

1.04-18 and up

SOUR:TRig:INT:ONLY
Examples:
SOUR:TRig:INT:ONLY

C++: rp_GenTriggerOnlyBoth()

Python: rp_GenTriggerOnlyBoth()

Synchronously triggers the generation of both fast analog outputs immediately.



2.07-43 and up

SOUR<n>:TRig:INT:ONLY
Examples:
SOUR1:TRig:INT:ONLY

C++: rp_GenTriggerOnly(rp_channel_t channel)

Python: rp_GenTriggerOnly(<channel>)

Triggers the generation of the specified fast analog output immediately.

2.07-43 and up

SOUR:TRig:EXT:DEBouncer[:US] <utime>
Example:
SOUR:TRig:EXT:DEBouncer:US 1

C++: rp_GenSetExtTriggerDebouncerUs(double utime)

Python: rp_GenSetExtTriggerDebouncerUs(<utime>)

Sets the external trigger generation debouncer in microseconds (value must be positive).

2.00-15 and up

SOUR:TRig:EXT:DEBouncer[:US]? > <utime>
Example:
SOUR:TRig:EXT:DEBouncer:US? > 1

C++: rp_GenGetExtTriggerDebouncerUs(double *utime)

Python: rp_GenSetExtTriggerDebouncerUs(<utime>)

Get the external trigger generation debouncer setting in microseconds.

2.00-15 and up

TRig:EXT:LEV <voltage>
Example:
TRig:EXT:LEV 1

C++: rp_SetExternalTriggerLevel(float voltage)

Python: rp_SetExternalTriggerLevel(<voltage>)

Set the external trigger level in V. (Only SIGNALlab 250-12)

2.04-35 and up

TRig:EXT:LEV? > <voltage>
Example:
TRig:EXT:LEV? > 1

C++: rp_GetExternalTriggerLevel(float* voltage)

Python: rp_GetExternalTriggerLevel()

Get the external trigger level in V. (Only SIGNALlab 250-12)

2.04-35 and up

Generator settings

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <frequency> = {0 ... 62.5e6} (in Hertz). Default: 1000

  • <type> = {SINE, SQUARE, TRIANGLE, SAWU, SAWD, PWM, ARBITRARY, DC, DC_NEG} Default: SINE

  • <amplitude> = {-1 ... 1} (in Volts). Default: 1 for SIGNALlab 250-12 {-5 ... 5}

  • <level> = {-1 ... 1}``(in Volts). Default: ``0 for SIGNALlab 250-12 {-5 ... 5}

  • <offset> = {-1 ... 1} (in Volts). Default: 0

  • <phase> = {-360 ... 360} (in Degrees). Default: 0

  • <ratio> = {0 ... 1} Default: 0.5 Where 1 corresponds to 100%

  • <time> = {0 ... 10000} Default: 1 The minimum and maximum value depends on the signal frequency.

  • <array> = {value1, ...} Max 16384 values, floats in the range -1 to 1

  • <waveform> = {value1, ...} Max 16384 values, floats in the range -1 to 1 (arbBuffer for Python API and Jupyter)

  • <lenght> waveform array length

  • <load_mode> = {INF, L50} Default: INF

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Waveforms - RP_WAVEFORM_SINE, RP_WAVEFORM_SQUARE, RP_WAVEFORM_TRIANGLE, RP_WAVEFORM_RAMP_UP, RP_WAVEFORM_RAMP_DOWN, RP_WAVEFORM_DC, RP_WAVEFORM_PWM, RP_WAVEFORM_ARBITRARY, RP_WAVEFORM_DC_NEG, RP_WAVEFORM_SWEEP

  • Rise and fall times - RISE_FALL_MIN_RATIO, RISE_FALL_MAX_RATIO

  • Load modes - RP_GEN_HI_Z, RP_GEN_50Ohm

SIGNALlab 250-12 only:

  • Generator gain - RP_GAIN_1X, RP_GAIN_5X

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

SOUR<n>:FUNC <type>
Examples:
SOUR2:FUNC TRIANGLE

C++: rp_GenWaveform(rp_channel_t channel, rp_waveform_t type)

Python: rp_GenWaveform(<channel>, <type>)

Set the waveform of a fast analog output.

1.04-18 and up

SOUR<n>:FUNC? > <type>
Examples:
SOUR2:FUNC? > TRIANGLE

C++: rp_GenGetWaveform(rp_channel_t channel, rp_waveform_t *type)

Python: rp_GenGetWaveform(<channel>)

Get the waveform of a fast analog output.

1.04-18 and up

SOUR<n>:FREQ:FIX <frequency>
Examples:
SOUR2:FREQ:FIX 100000

C++: rp_GenFreq(rp_channel_t channel, float frequency)

Python: rp_GenFreq(<channel>, <frequency>)

Set the signal frequency of a fast analog output.
For the ARBITRARY waveform, this is the frequency of one signal period (a buffer of
16384 samples).

1.04-18 and up

SOUR<n>:FREQ:FIX:Direct <frequency>
Examples
SOUR2:FREQ:FIX:Direct 100000

C++: rp_GenFreqDirect(rp_channel_t channel, float frequency)

Python: rp_GenFreqDirect(<channel>, <frequency>)

Set the channel signal frequency in FPGA without reseting the generator and rebuilding
the signal.


2.04-35 and up

SOUR<n>:FREQ:FIX? > <frequency>
Examples:
SOUR2:FREQ:FIX? > 100000

C++: rp_GenGetFreq(rp_channel_t channel, float *frequency)

Python: rp_GenGetFreq(<channel>)

Get signal frequency of the specified channel.

1.04-18 and up

SOUR<n>:VOLT <amplitude>
Examples:
SOUR2:VOLT 0.5

C++: rp_GenAmp(rp_channel_t channel, float amplitude)

Python: rp_GenAmp(<channel>, <amplitude>)

Set the one-way amplitude of a fast analog output in Volts.
Amplitude + offset value must be less than the maximum output voltage range (±1 V)
(±2 V/ ±10 V (Hi-Z load) for SIGNALlab).

1.04-18 and up

SOUR<n>:VOLT? > <amplitude>
Examples:
SOUR2:VOLT? > 0.5

C++: rp_GenGetAmp(rp_channel_t channel, float *amplitude)

Python: rp_GenGetAmp(<channel>)

Get the one-way amplitude of a fast analog output in Volts.

1.04-18 and up

SOUR<n>:VOLT:OFFS <offset>
Examples:
SOUR1:VOLT:OFFS 0.2

C++: rp_GenOffset(rp_channel_t channel, float offset)

Python: rp_GenOffset(<channel>, <offset>)

Set the DC offset voltage of a fast analog output in Volts.
Amplitude + offset value must be less than the maximum output voltage range (±1 V)
(±2 V/ ±10 V (Hi-Z load) for SIGNALlab).

1.04-18 and up

SOUR<n>:VOLT:OFFS? > <offset>
Examples:
SOUR1:VOLT:OFFS? > 0.2

C++: rp_GenGetOffset(rp_channel_t channel, float *offset)

Python: rp_GenGetOffset(<channel>)

Get the DC offset of a fast analog output in Volts.

1.04-18 and up

SOUR<n>:PHAS <phase>
Examples:
SOUR2:PHAS 30

C++: rp_GenPhase(rp_channel_t channel, float phase)

Python: rp_GenPhase(<channel>, <phase>)

Set the phase of a fast analog output in degrees. The signal starts generating with the
specified phase. For example, if the phase is set to 90 degrees, the signal starts
generating as cosine instead of sine.

1.04-18 and up

SOUR<n>:PHAS? > <phase>
Examples:
SOUR2:PHAS? > 30

C++: rp_GenGetPhase(rp_channel_t channel, float *phase)

Python: rp_GenGetPhase(<channel>)

Get the phase of a fast analog output in degrees.

1.04-18 and up

SOUR<n>:DCYC <ratio>
Examples:
SOUR1:DCYC 0.2

C++: rp_GenDutyCycle(rp_channel_t channel, float ratio)

Python: rp_GenDutyCycle(<channel>, <ratio>)

Set the duty cycle of the PWM waveform.

1.04-18 and up

SOUR<n>:DCYC? > <ratio>
Examples:
SOUR1:DCYC > 0.2

C++: rp_GenGetDutyCycle(rp_channel_t channel, float *ratio)

Python: def rp_GenGetDutyCycle(<channel>)

Get the duty cycle of the PWM waveform.

1.04-18 and up

SOUR<n>:TRAC:DATA:DATA <array>
Examples:
SOUR1:TRAC:DATA:DATA 1,0.5,0.2

C++: rp_GenArbWaveform(rp_channel_t channel, float *waveform, uint32_t length)

Python: rp_GenArbWaveform(<channel>, <waveform>, <length>)
rp_GenArbWaveformNP(<channel>, <np_buffer>)
Import data for one period of an arbitrary waveform (should be exactly 16384 samples).
If fewer samples are provided, the output frequency will be higher.


1.04-18 and up

SOUR<n>:TRAC:DATA:DATA? > <array>
Examples:
SOUR1:TRAC:DATA:DATA? > 1,0.5,0.2

C++: rp_GenGetArbWaveform(rp_channel_t channel, float *waveform, uint32_t *length)

Python: rp_GenGetArbWaveform(<channel>, <waveform>)
rp_GenGetArbWaveformNP(<channel>, <np_buffer>)

Get the user-defined arbitrary waveform period.

1.04-18 and up

SOUR<n>:LOAD <load_mode>
Examples:
SOUR2:LOAD L50

C++: rp_GenSetLoadMode(rp_channel_t channel, rp_gen_load_mode_t mode)

Python: rp_GenSetLoadMode(<channel>, <mode>)

Set the load mode for the output. When switching from INF to L50 also halves the set
amplitude (SOUR<n>:VOLT). When switching from L50 to INF the amplitude is doubled.
Frist set load, then set the amplitude. (SIGNALlab only)

2.04-35 and up

SOUR<n>:LOAD? > <load_mode>
Examples:
SOUR2:LOAD? > L50

C++: rp_GenGetLoadMode(rp_channel_t channel, rp_gen_load_mode_t *mode)

Python: rp_GenGetLoadMode(<mode>)

Get the load mode for the output. (SIGNALlab only)

2.04-35 and up

-



C++: rp_GenSetGainOut(rp_channel_t channel, rp_gen_gain_t gain_mode)

Python: rp_GenSetGainOut(<channel>, <gain_mode>)

Set SIGNALlab output gain. (SIGNALlab only)

1.04-18 and up

-



C++: rp_GenGetGainOut(rp_channel_t channel, rp_gen_gain_t *gain_mode)

Python: rp_GenGetGainOut(<channel>)

Get SIGNALlab output gain. (SIGNALlab only)

1.04-18 and up

SOUR<n>:RISE:TIME <time>
Examples:
SOUR1:RISE:TIME 0.1

C++: rp_GenRiseTime(rp_channel_t channel, float time)

Python: rp_GenRiseTime(<channel>, <time>)

Set signal rise time of a fast analog output in microseconds.
The range of acceptable values depends on the frequency.
To configure, first specify the signal frequency.

2.00-18 and up

SOUR<n>:RISE:TIME? > <time>
Examples:
SOUR1:RISE:TIME? > 0.1

C++: rp_GenGetRiseTime(rp_channel_t channel, float *time)

Python: rp_GenGetRiseTime(<channel>)

Get signal rise time of a fast analog output in microseconds.

2.00-18 and up

SOUR<n>:FALL:TIME <time>
Examples:
SOUR1:FALL:TIME 0.1

C++: rp_GenFallTime(rp_channel_t channel, float time)

Python: rp_GenFallTime(<channel>, <time>)

Set signal fall time of a fast analog output in microseconds.
The range of acceptable values depends on the frequency.
To configure, first specify the signal frequency.

2.00-18 and up

SOUR<n>:FALL:TIME? > <time>
Examples:
SOUR1:FALL:TIME? > 0.1
C++: rp_GenGetFallTime(rp_channel_t channel, float *time)

Python: rp_GenGetFallTime(<channel>)

Get signal fall time of a fast analog output in microseconds.

2.00-18 and up

Burst mode

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <mode> = {BURST, CONTINUOUS} Default: CONTINUOUS

  • <num>, <repetitions> = {1...65536} Default: 1

  • <period> = {1 µs - 500 s} Value in µs.

  • <period2> = {0.001 µs - 4 s} Value in µs.

  • <state> = {ON,OFF} Default: OFF

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Generator modes - RP_GEN_MODE_CONTINUOUS, RP_GEN_MODE_BURST

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

SOUR<n>:BURS:STAT <mode>
Examples:
SOUR1:BURS:STAT BURST
SOUR1:BURS:STAT CONTINUOUS
C++: rp_GenMode(rp_channel_t channel, rp_gen_mode_t mode)

Python: rp_GenMode(<channel>, <mode>)

Enable or disable burst (pulse) mode.
Red Pitaya will generate R bursts with N signal periods.
P is the time between the start of one and the start of the next burst.

1.04-18 and up

SOUR<n>:BURS:STAT? > <mode>
Examples:
SOUR1:BURS:STAT? > BURST
C++: rp_GenGetMode(rp_channel_t channel, rp_gen_mode_t *mode)

Python: rp_GenGetMode(<channel>)

Get the generation mode.

1.04-18 and up

SOUR<n>:BURS:NCYC <num>
Examples:
SOUR1:BURS:NCYC 3
C++: rp_GenBurstCount(rp_channel_t channel, int num)

Python: rp_GenBurstCount(<channel>, <num>)

Set the number of cycles/periods in one burst (N).

1.04-18 and up

SOUR<n>:BURS:NCYC? > <num>
Examples:
SOUR1:BURS:NCYC > 3
C++: rp_GenGetBurstCount(rp_channel_t channel, int *num)

Python: rp_GenGetBurstCount(<channel>)

Get the number of generated waveforms in a burst.

1.04-18 and up

SOUR<n>:BURS:NOR <repetitions>
Examples:
SOUR1:BURS:NOR 5
C++: rp_GenBurstRepetitions(rp_channel_t channel, int repetitions)

Python: rp_GenBurstRepetitions(<channel>, <repetitions>)

Set the number of repeated bursts (R) (65536 == INF repetitions)

1.04-18 and up

SOUR<n>:BURS:NOR? > <repetitions>
Examples:
SOUR1:BURS:NOR > 5
C++: rp_GenGetBurstRepetitions(rp_channel_t channel, int *repetitions)

Python: rp_GenGetBurstRepetitions(<channel>)

Get the number of burst repetitions.

1.04-18 and up

SOUR<n>:BURS:INT:PER <period>
Examples:
SOUR1:BURS:INT:PER 1000000
C++: rp_GenBurstPeriod(rp_channel_t channel, uint32_t period)

Python: rp_GenBurstPeriod(<channel>, <period>)

Set the duration of a single burst in microseconds (P). This specifies the time
between the start of one and the start of the next burst. The bursts will always have at
least 1 us between them: If the period is shorter than the burst, the software will
default to 1 us between bursts.

1.04-18 and up

SOUR<n>:BURS:INT:PER? > <period>
Examples:
SOUR1:BURS:INT:PER? > 1000000
C++: rp_GenGetBurstPeriod(rp_channel_t channel, uint32_t *period)

Python: rp_GenGetBurstPeriod(<channel>)

Get the period of a bursts in microseconds.

1.04-18 and up

SOUR<n>:BURS:INT:PER <period2>
Examples:
SOUR1:BURS:INT:PER 1000000
C++: rp_GenBurstPeriod(rp_channel_t channel, float period)

Python: rp_GenBurstPeriod(<channel>, <period>)

Set the duration of a single burst in microseconds (P). This specifies the time
between the start of one and the start of the next burst.
The fractional part is given in nanoseconds.

in dev

SOUR<n>:BURS:INT:PER? > <period2>
Examples:
SOUR1:BURS:INT:PER? > 1000000
C++: rp_GenGetBurstPeriod(rp_channel_t channel, float *period)

Python: rp_GenGetBurstPeriod(<channel>)

Get the period of a bursts in microseconds.

in dev

SOUR<n>:BURS:INITValue <amplitude>
Examples:
SOUR1:BURS:INITValue 0.5
C++: rp_GenSetInitGenValue(rp_channel_t channel, float amplitude)

Python: rp_GenSetInitGenValue(<channel>, <amplitude>)

Set the initial voltage value that appears on the fast analog output once it is enabled
but before the signal is generated (See OUTPUT<n>:STATE,
rp_GenOutEnable(rp_channel_t channel)).

2.05-37 and up

SOUR<n>:BURS:INITValue? > <amplitude>
Examples:
SOUR1:BURS:INITValue? > 0.5
C++: rp_GenGetInitGenValue(rp_channel_t channel, float *amplitude)

Python: rp_GenGetInitGenValue(<channel>)

Get the initial voltage value that appears on the fast analog output once it is enabled
but before the signal is generated (See OUTPUT<n>:STATE,
rp_GenOutEnable(rp_channel_t channel)).

2.05-37 and up

SOUR<n>:BURS:LASTValue <amplitude>
Examples:
SOUR1:BURS:LASTValue 0.5
C++: rp_GenBurstLastValue(rp_channel_t channel, float amplitude)

Python: rp_GenBurstLastValue(<channel>, <amplitude>)

Set the end value of the generated burst signal.
The output will stay on this value until a new signal is generated.


2.00-18 and up

SOUR<n>:BURS:LASTValue? > <amplitude>
Examples:
SOUR1:BURS:LASTValue > 0.5
C++: rp_GenGetBurstLastValue(rp_channel_t channel, float *amplitude)

Python: rp_GenGetBurstLastValue(<channel>)

Get the end value of the generated burst signal.

2.00-18 and up

SOUR<n>:BURS:USE:LASTSample <state>
Examples:
SOUR1:BURS:USE:LASTSample ON
C++: rp_GenSetUseLastSample(rp_channel_t channel, bool enable)

Python: rp_GenSetUseLastSample(<channel>, <state>)

Enables the mode where the last sample in the buffer is used instead of the Last Value.
The output will stay on this value until a new signal is generated.


in dev

SOUR<n>:BURS:USE:LASTSample? > <state>
Examples:
SOUR1:BURS:USE:LASTSample > ON
C++: rp_GenGetUseLastSample(rp_channel_t channel, bool *enable)

Python: rp_GenGetUseLastSample(<channel>)

Returns the current setting of the ‘Use Last Sample’ mode.

in dev

SOUR<n>:INITValue <amplitude>
Examples:
SOUR1:INITValue 0.5
C++: rp_GenSetInitGenValue(rp_channel_t channel, float amplitude)

Python: rp_GenSetInitGenValue(<channel>, <amplitude>)

Set the initial voltage value that appears on the fast analog output once it is enabled
but before the signal is generated (See OUTPUT<n>:STATE,
rp_GenOutEnable(rp_channel_t channel)).

2.00-18 and up

SOUR<n>:INITValue? > <amplitude>
Examples:
SOUR1:INITValue? > 0.5
C++: rp_GenGetInitGenValue(rp_channel_t channel, float *amplitude)

Python: rp_GenGetInitGenValue(<channel>)

Get the initial voltage value that appears on the fast analog output once it is enabled
but before the signal is generated (See OUTPUT<n>:STATE,
rp_GenOutEnable(rp_channel_t channel)).

2.00-18 and up

Sweep mode

Set the waveform type to sweep to enable

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <frequency> = {0 ... 62.5e6} (in Hertz). Default: 1000 (start), 10000 (end)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Sweep direction - RP_GEN_SWEEP_DIR_NORMAL, RP_GEN_SWEEP_DIR_UP_DOWN

  • Sweep mode - RP_GEN_SWEEP_MODE_LINEAR, RP_GEN_SWEEP_MODE_LOG

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

-



C++: rp_GenSweepStartFreq(rp_channel_t channel, float frequency)

Python: rp_GenSweepStartFreq(<channel>, <frequency>)

Set sweep start frequency.

2.00-18 and up

-



C++: rp_GenGetSweepStartFreq(rp_channel_t channel, float *frequency)

Python: rp_GenGetSweepStartFreq(<channel>)

Get sweep start frequency.

2.00-18 and up

-



C++: rp_GenSweepEndFreq(rp_channel_t channel, float frequency)

Python: rp_GenSweepEndFreq(<channel>, <frequency>)

Set sweep end frequency.

2.00-18 and up

-



C++: rp_GenGetSweepEndFreq(rp_channel_t channel, float *frequency)

Python: rp_GenGetSweepEndFreq(<channel>)

Get sweep end frequency.

2.00-18 and up

-



C++: rp_GenSweepMode(rp_channel_t channel, rp_gen_sweep_mode_t mode)

Python: rp_GenSweepMode(<channel>, <mode>)

Set sweep mode to either linear or logarithmic.

2.00-18 and up

-



C++: rp_GenGetSweepMode(rp_channel_t channel, rp_gen_sweep_mode_t *mode)

Python: rp_GenGetSweepMode(<channel>)

Get sweep mode (either linear or logarithmic).

2.00-18 and up

-



C++: rp_GenSweepDir(rp_channel_t channel, rp_gen_sweep_dir_t mode)

Python: rp_GenSweepDir(<channel>, <mode>)

Set sweep direction (normal (up) or up-down).

2.00-18 and up

-



C++: rp_GenGetSweepDir(rp_channel_t channel, rp_gen_sweep_dir_t *mode)

Python: rp_GenGetSweepDir(<channel>)

Get sweep direction (normal (up) or up-down).

2.00-18 and up

Sweep mode extended

Parameter options:

  • <n> = {1,2} (set channel OUT1 or OUT2)

  • <frequency> = {0 ... 62.5e6} (in Hertz). Default: 1000 (start), 10000 (end)

  • <time> = {1 ... } (in μS). Default: 1

  • <mode> = {LINEAR, LOG} (in μS). Default: LINEAR

  • <dir> = {NORMAL, UP_DOWN} (in μS). Default: NORMAL

  • <state> = {ON, OFF}

  • <count> = {0 ... }. Default: 1 (start)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Sweep direction - RP_GEN_SWEEP_DIR_NORMAL, RP_GEN_SWEEP_DIR_UP_DOWN

  • Sweep mode - RP_GEN_SWEEP_MODE_LINEAR, RP_GEN_SWEEP_MODE_LOG

  • State - True,False

Note

This API uses a class to control the sweep mode. This class is available in the rp-sweep library.

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

-



C++: run()

Python: run()

Starts the frequency generator.

2.04-35 and up

-



C++: stop()

Python: stop()

Stops the thread that generates frequencies.

2.04-35 and up

SOUR:SWeep:DEFault
Examples:
SOUR:SWeep:DEFault

C++: setDefault()

Python: setDefault()

Stops sweep generation on all channels and sets default values.

2.05-37 and up

SOUR:SWeep:RESET
Examples:
SOUR:SWeep:RESET

C++: resetAll()

Python: resetAll()

Resets all channels at once.

2.04-35 and up

SOUR:SWeep:PAUSE <state>
Examples:
SOUR:SWeep:PAUSE ON

C++: pause(bool state)

Python: pause(<state>)

Stops the frequency change, but does not reset the state.

2.04-35 and up

SOUR<n>:SWeep:STATE <state>
Examples:
SOUR1:SWeep:STATE ON

C++: genSweep(rp_channel_t channel, bool enable)

Python: genSweep(<channel>, <state>)

Enables or disables generation of the specified channel.

2.04-35 and up

SOUR<n>:SWeep:STATE? > <state>
Examples:
SOUR1:SWeep:STATE? > ON

C++: isGen(rp_channel_t channel, bool *state)

Python: isGen(<channel>)

Returns the channel status.

2.04-35 and up

SOUR<n>:SWeep:FREQ:START <frequency>
Examples:
SOUR1:SWeep:FREQ:START 1000

C++: setStartFreq(rp_channel_t channel, float frequency)

Python: setStartFreq(<channel>, <frequency>)

Set sweep start frequency.

2.04-35 and up

SOUR<n>:SWeep:FREQ:START? > <frequency>
Examples:
SOUR1:SWeep:FREQ:START? > 1000

C++: getStartFreq(rp_channel_t channel, float *frequency)

Python: getStartFreq(<channel>)

Get sweep start frequency.

2.04-35 and up

SOUR<n>:SWeep:FREQ:STOP <frequency>
Examples:
SOUR1:SWeep:FREQ:STOP 10000

C++: setStopFreq(rp_channel_t channel, float frequency)

Python: setStopFreq(<channel>, <frequency>)

Set sweep stop frequency.

2.04-35 and up

SOUR<n>:SWeep:FREQ:STOP? > <frequency>
Examples:
SOUR1:SWeep:FREQ:STOP? > 10000

C++: getStopFreq(rp_channel_t channel, float *frequency)

Python: getStopFreq(<channel>)

Get sweep stop frequency.

2.04-35 and up

SOUR<n>:SWeep:TIME <time>
Examples:
SOUR1:SWeep:TIME 10000

C++: setTime(rp_channel_t channel, int us)

Python: setTime(<channel>, <frequency>)

Sets the generation time, how long it takes to transition from the
starting frequency to the final frequency, measured in microseconds.

2.04-35 and up

SOUR<n>:SWeep:TIME? > <time>
Examples:
SOUR1:SWeep:TIME? > 10000

C++: getTime(rp_channel_t channel, int *us)

Python: getTime(<channel>)

Returns generation time in microseconds.

2.04-35 and up

SOUR<n>:SWeep:MODE <mode>
Examples:
SOUR1:SWeep:MODE LINEAR

C++: setMode(rp_channel_t channel, rp_gen_sweep_mode_t mode)

Python: setMode(<channel>, <mode>)

Set sweep mode to either linear or logarithmic.

2.04-35 and up

SOUR<n>:SWeep:MODE? > <mode>
Examples:
SOUR1:SWeep:MODE? > LINEAR

C++: getMode(rp_channel_t channel, rp_gen_sweep_mode_t *mode)

Python: getMode(<channel>)

Get sweep mode (either linear or logarithmic).

2.04-35 and up

SOUR<n>:SWeep:REP:INF <state>
Examples:
SOUR1:SWeep:REP:INF ON

C++: setNumberOfRepetitions(rp_channel_t _ch, bool _isInfinty, uint64_t _count)

Python: setNumberOfRepetitions(<channel>, <state>, <count>)

Sets the infinite signal generation mode.

2.07-43 and up

SOUR<n>:SWeep:REP:INF? > <state>
Examples:
SOUR1:SWeep:REP:INF? > ON

C++: getNumberOfRepetitions(rp_channel_t _ch, bool* _isInfinty, uint64_t* _count)

Python: getNumberOfRepetitions(<channel>, <state>, <count>)

Gets the infinite signal generation mode.

2.07-43 and up

SOUR<n>:SWeep:REP:COUNT <count>
Examples:
SOUR1:SWeep:REP:COUNT 10

C++: setNumberOfRepetitions(rp_channel_t _ch, bool _isInfinty, uint64_t _count)

Python: setNumberOfRepetitions(<channel>, <state>, <count>)

Sets the number of repetitions when generating a signal.

2.07-43 and up

SOUR<n>:SWeep:REP:COUNT? > <count>
Examples:
SOUR1:SWeep:REP:COUNT? > 10

C++: getNumberOfRepetitions(rp_channel_t _ch, bool* _isInfinty, uint64_t* _count)

Python: getNumberOfRepetitions(<channel>, <state>, <count>)

Gets the number of repetitions when generating a signal.

2.07-43 and up

SOUR<n>:SWeep:DIR <dir>
Examples:
SOUR1:SWeep:DIR UP_DOWN

C++: setDir(rp_channel_t channel, rp_gen_sweep_dir_t dir)

Python: setDir(<channel>, <dir>)

Set sweep direction (normal (up) or up-down).

2.04-35 and up

SOUR<n>:SWeep:DIR? > <dir>
Examples:
SOUR1:SWeep:DIR? > UP_DOWN

C++: getDir(rp_channel_t channel, rp_gen_sweep_dir_t *dir)

Python: getDir(<channel>)

Get sweep direction (normal (up) or up-down).

2.04-35 and up