2.3.5. List of supported SCPI & API commands

Here is a list of all available SCPI, API, and JupyterLab commands. The commands are organized into tables by functionality. Each table row represents the same command in SCPI, Python API, C API, and JupyterLAB. The Jupyter commands are identical to Python API commands, so please refer to them. In the final two columns is a command description and ecosystem version in which the command first appeared.

At the beginning of each table are all command parameter options and available macros.

For API commands you can find a detailed description in these C header files:

2.3.5.1. How to find all available SCPI commands per OS version?

Use the SYSTem:Help? (IN DEV) SCPI command, which lists all available SCPI commands.

You can also find all SCPI commands that the board will accept depending on the Red Pitaya OS version here:

For all other Red Pitaya OS versions, go to the link above and change the branch version to:

  • 2.00-35 - Branch 2024.2 (file ends in .cpp)

  • 2.00-30 - Branch 2024.1 (file ends in .cpp)

  • 2.00-23 - Branch 2023.3 (file ends in .cpp)

  • 2.00-18 - Branch 2023.2 (file ends in .c)

  • 2.00-15 - Branch 2023.1 - Red Pitaya GitHub 2023.1- scpi-server/src/scpi-commands.c (file ends in .c)

  • 1.04-28 - Branch 2022.2 (file ends in .c)

  • 1.04-18 - Branch 2022.1 (file ends in .c)

../../_images/All_os_scpi_commands.png

2.3.5.1.1. Initialization commands

Table of correlated SCPI and API commands for the Red Pitaya.

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

-



C: rp_Init()

Python: rp_Init()

Initializes and enables the command interface.

1.04-18 and up

-



C: rp_IsApiInit()

Python: rp_IsApiInit()

Check whether the API interface is initialized.

1.04-18 and up

-



C: rp_Release()

Python: rp_Release()

Release command interface resources.

1.04-18 and up

-



C: rp_Reset()

Python: rp_Reset()

Resets digital and analog pin settings as well as
generation and acquisition settings to default values.


1.04-18 and up

-



C: rp_Reset()

Python: rp_Reset()

Resets digital and analog pin settings as well as
generation and acquisition settings to default values.


1.04-18 and up

2.3.5.1.2. Board control commands

Parameter options:

  • <year> = {1900, ...} Default: OS release date and time

  • <month> = {1, 12}

  • <day> = {1, 31}

  • <hours> = {0, 23}

  • <minutes> = {0, 59}

  • <seconds> = {0, 59}

  • <log_mode> = {OFF, CONSOLE, SYSLOG}

  • <board_id> = {0, 15}

  • <enable> = {true, false}

  • <errorCode> = {RP_OK, RP_EOED, RP_EOMD, RP_ECMD, RP_EMMD, RP_EUMD, RP_EOOR, RP_ELID, RP_EMRO, RP_EWIP, RP_EPN, RP_UIA, RP_FCA,

  • <errorCode> =  RP_RCA, RP_BTS, RP_EIPV, RP_EUF, RP_ENN, RP_EFOB, RP_EFCB, RP_EABA, RP_EFRB, RP_EFWB, RP_EMNC, RP_NOTS}

Available Jupyter and API macros:

  • Red Pitaya states and errors:
    • RP_OK - OK

    • RP_EOED - Failed to Open EEPROM Device.

    • RP_EOMD - Failed to open memory device.

    • RP_ECMD - Failed to close memory device.

    • RP_EMMD - Failed to map memory device.

    • RP_EUMD - Failed to unmap memory device.

    • RP_EOOR - Value out of range.

    • RP_ELID - LED input direction is not valid.

    • RP_EMRO - Modifying read only filed is not allowed.

    • RP_EWIP - Writing to input pin is not valid.

    • RP_EPN - Invalid Pin number.

    • RP_UIA - Uninitialized Input Argument.

    • RP_FCA - Failed to Find Calibration Parameters.

    • RP_RCA - Failed to Read Calibration Parameters.

    • RP_BTS - Buffer too small

    • RP_EIPV - Invalid parameter value

    • RP_EUF - Unsupported Feature

    • RP_ENN - Data not normalized

    • RP_EFOB - Failed to open bus

    • RP_EFCB - Failed to close bus

    • RP_EABA - Failed to acquire bus access

    • RP_EFRB - Failed to read from the bus

    • RP_EFWB - Failed to write to the bus

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

RP:LOGmode <log_mode>
Examples:
RP:LOGmode SYSLOG

-



Enables scpi-server log output mode.

1.04-18 and up

SYSTem:TIME <hours>,<minutes>,<seconds>
Examples:
SYSTem:TIME 16:12:45
SYST:TIME 11:23:01
-



Sets the time on the board.

2.00-18 and up

SYSTem:TIME? > time
Examples:
SYSTem:TIME? > 16:12:45
SYST:TIME? > 11:23:01
-



Returns the current time on the board.

2.00-18 and up

SYSTem:DATE <year>,<month>,<day>
Examples:
SYSTem:DATE 2023-04-04
SYST:DATE 2002-12-29
-



Sets the date on the board.

2.00-18 and up

SYSTem:DATE? > date
Examples:
SYSTem:DATE? > 2023-04-04
SYST:DATE? > 2002-12-29
-



Returns the current date on the board.

2.00-18 and up

SYSTem:BRD:ID? > <board_id>
Examples:
SYSTem:BRD:ID? > 1

C: rp_IdGetID(uint32_t *id)

Python: rp_IdGetID()

Returns the Red Pitaya board ID.

2.00-18 and up

SYSTem:BRD:Name? > board name
Examples:
SYSTem:BRD:Name? > STEMlab 125-14 v1.0

C: const char* rp_GetVersion()

Python: rp_GetVersion()

Returns the Red Pitaya board version.

2.00-18 and up

SYSTem:Help? > <List of SCPI commands>
Examples:
SYSTem:Help? > *CLS\n*ESE\n...

-



Returns a list of all commands
that the SCPI server can process.

2.00-35 and up

-



C: rp_IdGetDNA(uint64_t *dna)

Python: rp_IdGetDNA()

Returns the unique DNA code of the FPGA chip.

2.00-18 and up

-



C: const char* rp_GetError(int errorCode)

Python: rp_GetError(<errorCode>)

Returns the description of the input error code.

2.00-18 and up

-



C: rp_EnableDigitalLoop(bool enable)

Python: rp_EnableDigitalLoop(<enable>)

Enables/disables the Digital Loop (internal FPGA
connection between fast analog inputs and outputs).


2.00-18 and up

2.3.5.1.3. LEDs and GPIOs

Parameter options:

  • <dir> = {OUT,IN}

  • <gpio> = {{DIO0_P...DIO7_P}, {DIO0_N...DIO7_N}}

  • <led> = {LED0...LED8}

  • <pin> = {gpio, led}

  • <state> = {0,1}

  • <reg_state> = {0b00000000} - One LED/DIO per bit. (10 bit DIO register on SDRlab and STEMlab 4-Input)

  • <reg_direction> = {0b00000000} - One DIO per bit. (10 bit DIO register on SDRlab and STEMlab 4-Input)

Available Jupyter and API macros:

  • States - RP_LOW, RP_HIGH

  • Directions - RP_IN, RP_OUT

  • LEDs - RP_LED0, RP_LED1, ..., RP_LED7

  • DIOx_P - RP_DIO0_P, RP_DIO1_P, ..., RP_DIO7_P Goes up to 9 on SDRlab and STEMlab 4-Input

  • DIOx_N - RP_DIO0_N, RP_DIO1_N, ..., RP_DIO7_N Goes up to 9 on SDRlab and STEMlab 4-Input

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

DIG:RST
Examples:
DIG:RST

C: rp_DpinReset()

Python: rp_DpinReset()

Sets digital pins to default values. Pins DIO1_P - DIO7_P,
RP_DIO0_N - RP_DIO7_N are set all INPUT and to LOW. LEDs are set to LOW/OFF.


1.04-18 and up

DIG:PIN:DIR <dir>,<gpio>
Examples:
DIG:PIN:DIR OUT,DIO0_N
DIG:PIN:DIR IN,DIO1_P
C: rp_DpinSetDirection(rp_dpin_t pin, rp_pinDirection_t direction)

Python: rp_DpinSetDirection(<pin>, <direction>)

Set the direction of digital pins to output or input.

1.04-18 and up

DIG:PIN:DIR? <gpio>
Examples:
DIG:PIN:DIR? DIO0_N
DIG:PIN:DIR? DIO1_P
C: rp_DpinGetDirection(rp_dpin_t pin, rp_pinDirection_t* direction)

Python: rp_DpinGetDirection(<pin>)

Get digital input output pin direction.

1.04-18 and up

DIG:PIN <pin>,<state>
Examples:
DIG:PIN DIO0_N,1
DIG:PIN LED2,1
C: rp_DpinSetState(rp_dpin_t pin, rp_pinState_t state)

Python: rp_DpinSetState(<pin>, <state>)

Set the state of digital outputs to 1 (HIGH) or 0 (LOW).
Returns a 1 (HIGH) if the pin is floating.


1.04-18 and up

DIG:PIN? <pin> > <state>
Examples:
DIG:PIN? DIO0_N
DIG:PIN? LED2
C: rp_DpinGetState(rp_dpin_t pin, rp_pinState_t* state)

Python: rp_DpinGetState(<pin>)

Get state of digital inputs and outputs.

1.04-18 and up

-



C: rp_LEDSetState(uint32_t reg_state)

Python: rp_LEDSetState(<reg_state>)

Set the state of the 8-bit LED register. Each bit corresponds to the state
of one LED.


1.04-18 and up

-



C: rp_LEDGetState(uint32_t *reg_state)

Python: rp_LEDGetState()

Get the state of the 8-bit LED register. Each bit corresponds to the state
of one LED.


1.04-18 and up

-



C: rp_GPIOnSetDirection(uint32_t reg_direction)
rp_GPIOnSetDirection(uint32_t reg_direction)
Python: rp_GPIOnSetDirection(<reg_direction>)
rp_GPIOpSetDirection(<reg_direction>)
Set the state of the DIO_N or DIO_P direction register. Each bit corresponds
to the direction of one DIO_N or DIO_P pin.


1.04-18 and up

-



C: rp_GPIOnGetDirection(uint32_t *reg_direction)
rp_GPIOpGetDirection(uint32_t *reg_direction)
Python: rp_GPIOnGetDirection()
rp_GPIOpGetDirection()
Get the state of the DIO_N or DIO_P direction register. Each bit corresponds
to the direction of one DIO_N or DIO_P pin.


1.04-18 and up

-



C: rp_GPIOnSetState(uint32_t reg_state)
rp_GPIOpSetState(uint32_t reg_state)
Python: rp_GPIOnSetState(<reg_state>)
rp_GPIOpSetState(<reg_state>)
Set the state of the DIO_N or DIO_P state register. Each bit corresponds
to the state of one DIO_N or DIO_P pin.


1.04-18 and up

-



C: rp_GPIOnGetState(uint32_t *state)
rp_GPIOpGetState(uint32_t *state)
Python: rp_GPIOnGetState()
rp_GPIOpGetState()
Get the state of the DIO_N or DIO_P state register. Each bit corresponds
to the state of one DIO_N or DIO_P pin.


1.04-18 and up

2.3.5.1.4. Analog Inputs and Outputs

Parameter options:

  • <ain> = {AIN0, AIN1, AIN2, AIN3}

  • <aout> = {AOUT0, AOUT1, AOUT2, AOUT3}

  • <pin> = {ain, aout}

  • <value> = {value in Volts}

Available Jupyter and API macros:

  • Analog outputs - RP_AOUT0, RP_AOUT1, ..., RP_AOUT3

  • Analog inputs - RP_AIN0, RP_AIN1, ..., RP_AIN3

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ANALOG:RST
Examples:
ANALOG:RST

C: rp_ApinReset()

Python: rp_ApinReset()

Sets analog outputs to default values (0 V).

1.04-18 and up

ANALOG:PIN <pin>,<value>
Examples:
ANALOG:PIN AOUT2,1.34

C: rp_ApinSetValue(rp_apin_t pin, float value)
rp_ApinSetValueRaw(rp_apin_t pin, uint32_t value)
Python: rp_ApinSetValue(<pin>, <value>)
rp_ApinSetValueRaw(<pin>, <value>)
Set the analog voltage on the slow analog outputs.
The voltage range of slow analog outputs is: 0 - 1.8 V

1.04-18 and up

ANALOG:PIN? <pin> > <value>
Examples:
ANALOG:PIN? AOUT2 > 1.34
ANALOG:PIN? AIN1 > 1.12
C: rp_ApinGetValue(rp_apin_t pin, float* value, uint32_t* raw)
rp_ApinGetValueRaw(rp_apin_t pin, uint32_t* value)
Python: rp_ApinGetValue(<pin>)
rp_ApinGetValueRaw(<pin>)
Read the analog voltage from the slow analog inputs.
The voltage range of slow analog inputs is: 0 - 3.3 V

1.04-18 and up

-



C: rp_ApinGetRange(rp_apin_t pin, float* min_val, float* max_val)

Python: rp_ApinGetRange(<pin>)

Get voltage range of the specified analog pin.

1.04-18 and up

-



C: rp_AIpinGetValue(int unsigned pin, float* value, uint32_t* raw)
rp_AIpinGetValueRaw(int unsigned pin, uint32_t* value)
Python: rp_AIpinGetValue(<pin>)
rp_AIpinGetValueRaw(<pin>)

Get the analog voltage on the slow analog inputs (Volts or RAW).

1.04-18 and up

-



C: rp_AOpinSetValue(int unsigned pin, float value)
rp_AOpinSetValueRaw(int unsigned pin, uint32_t value)
Python: rp_AOpinSetValue(<pin>, <value>)
rp_AOpinSetValueRaw(<pin>, <value>)

Set the output voltage on slow analog outputs.

1.04-18 and up

-



C: rp_AOpinGetValue(int unsigned pin, float* value, uint32_t* raw)
rp_AOpinGetValueRaw(int unsigned pin, uint32_t* value)
Python: rp_AOpinGetValue(<pin>)
rp_AOpinGetValueRaw(<pin>)

Get the output voltage on slow analog outputs.

1.04-18 and up

-



C: rp_AOpinGetRange(int unsigned pin, float* min_val,  float* max_val)

Python: rp_AOpinGetRange(<pin>)

Get voltage range of the specified analog output pin.

1.04-18 and up

2.3.5.1.5. Daisy chain clocks and triggers

Parameter options:

  • <state> = {OFF, ON}

  • <mode> = {ADC, DAC}

  • <enable> = {true, false}

Available Jupyter and API macros:

  • Shared trigger source - OUT_TR_ADC, OUT_TR_DAC

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

DAISY:ENable <state>
Examples:
DAISY:ENable ON
C: rp_SetEnableDaisyChainSync

Python: ~

Enables clock and trigger sync over SATA daisy chain connectors.
Once the primary board will be triggered, the trigger will be forwarded to the secondary board over
the SATA connector where the trigger can be detected using rp_GenTriggerSource with EXT_NE selector.
Noticed that the trigger that is received over SATA is ORed with the external trigger from GPIO.

only 2.00-15

DAISY:ENable? > <state>
Examples:
DAISY:ENable? > ON
C: rp_GetEnableDaisyChainSync

Python: ~

Returns the current state of the SATA daisy chain mode.

only 2.00-15

DAISY:SYNC:TRIG <state>
Examples:
DAISY:SYNC:TRIG ON
C: rp_SetEnableDaisyChainTrigSync(bool enable)

Python: rp_SetEnableDaisyChainTrigSync(<enable>)

Enables trigger sync over SATA daisy chain connectors. Once the primary board will be triggered,
the trigger will be forwarded to the secondary board over the SATA connector
where the trigger can be detected using EXT_NE selector.

2.00-18 and up

DAISY:SYNC:TRIG? > <state>
Examples:
DAISY:SYNC:TRIG? > ON
C: rp_GetEnableDaisyChainTrigSync(bool *status)

Python: rp_GetEnableDaisyChainTrigSync()

Returns the current state of the trigger synchronization using Daisy Chain.

2.00-18 and up

DAISY:SYNC:CLK <state>
Examples:
DAISY:SYNC:CLK ON
C: rp_SetEnableDiasyChainClockSync(bool enable)

Python: rp_SetEnableDiasyChainClockSync(<enable>)

Enables clock sync over SATA daisy chain connectors.
The primary board will start generating a clock for the secondary unit and so on.

2.00-18 and up

DAISY:SYNC:CLK? > <state>
Examples:
DAISY:SYNC:CLK? > ON
C: rp_GetEnableDiasyChainClockSync(bool *state)

Python: rp_GetEnableDiasyChainClockSync()

Returns the current state of the SATA daisy chain mode.

2.00-18 and up

DAISY:TRIG_O:ENable <state>
Examples:
DAISY:TRIG_O:ENable ON
C: rp_SetDpinEnableTrigOutput(bool enable)

Python: rp_SetDpinEnableTrigOutput(<enable>)

Turns GPION_0 into trigger output for selected source - acquisition or generation.

2.00-15 - 2.00-30

DAISY:TRig:Out:ENable <state>
Examples:
DAISY:TRig:Out:ENable ON
C: rp_SetDpinEnableTrigOutput(bool enable)

Python: rp_SetDpinEnableTrigOutput(<enable>)

Turns GPION_0 into trigger output for selected source - acquisition or generation.

2.00-35 and up

DAISY:TRIG_O:ENable? > <state>
Examples:
DAISY:TRIG_O:ENable? > ON
C: rp_GetDpinEnableTrigOutput(bool *state)

Python: rp_GetDpinEnableTrigOutput()

Returns the current mode state for GPION_0. If true, then the pin mode works as a source.

2.00-15 - 2.00-30

DAISY:TRig:Out:ENable? > <state>
Examples:
DAISY:TRig:Out:ENable? > ON
C: rp_GetDpinEnableTrigOutput(bool *state)

Python: rp_GetDpinEnableTrigOutput()

Returns the current mode state for GPION_0. If true, then the pin mode works as a source.

2.00-35 and up

DAISY:TRIG_O:SOUR <mode>
Examples:
DAISY:TRIG_O:SOUR DAC
C: rp_SetSourceTrigOutput(rp_outTiggerMode_t mode)

Python: rp_SetSourceTrigOutput(<mode>)

Sets the trigger source mode ADC/DAC.

2.00-15 - 2.00-30

DAISY:TRig:Out:SOUR <mode>
Examples:
DAISY:TRig:Out:SOUR DAC
C: rp_SetSourceTrigOutput(rp_outTiggerMode_t mode)

Python: rp_SetSourceTrigOutput(<mode>)

Sets the trigger source mode ADC/DAC.

2.00-35 and up

DAISY:TRIG_O:SOUR? > <mode>
Examples:
DAISY:TRIG_O:SOUR? > DAC
C: rp_GetSourceTrigOutput(rp_outTiggerMode_t *mode)

Python: rp_GetSourceTrigOutput()

Returns the trigger source mode.

2.00-15 - 2.00-30

DAISY:TRig:Out:SOUR? > <mode>
Examples:
DAISY:TRig:Out:SOUR? > DAC
C: rp_GetSourceTrigOutput(rp_outTiggerMode_t *mode)

Python: rp_GetSourceTrigOutput()

Returns the trigger source mode.

2.00-35 and up

Note

The daisy chain commands only work for the X-channel system and the Red Pitaya Click Shields.

Note

The trigger signals from the SATA connector and the DIO0_P (External trigger pin) are OR-ed together in the software. The generation and acquisition trigger fronts apply after the signals have been combined and trigger either DAC or ADC depending on the DAISY:TRIG_O:SOUR <mode> command.

2.3.5.1.6. Phase locked loop

Note

These commands only work on SIGNALlab 250-12

Parameter options:

  • <state> = {OFF, ON}

  • <enable> = {true, false}

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

RP:PLL:ENable <state>
Examples:
RP:PLL:ENable ON

C: rp_SetPllControlEnable(bool enable)

Python: rp_SetPllControlEnable(<enable>)

Enables/disables PLL control (SIGNALlab 250-12 only).

2.00-35 and up

RP:PLL:ENable? > <state>
Examples:
RP:PLL:ENable? > ON

C: rp_GetPllControlEnable(bool *enable)

Python: rp_GetPllControlEnable()

Get the PLL enable setting (SIGNALlab 250-12 only).

2.00-35 and up

RP:PLL:STATE? > <enable>
Examples:
RP:PLL:STATE? > 1

C: rp_GetPllControlLocked(bool *status)

Python: rp_GetPllControlLocked()

Get the current state of the PLL (SIGNALlab 250-12 only).

2.00-35 and up

2.3.5.1.7. Signal Generator

Note

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

2.3.5.1.7.1. 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

2.3.5.1.7.2. 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.


1.04-18 and up

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

C: rp_GenTriggerOnly(rp_channel_t channel)

Python: rp_GenTriggerOnly(<channel>)

Triggers the generation of the specified fast analog output immediately.

1.04-18 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.00-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.00-35 and up

2.3.5.1.7.3. 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%

  • <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

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.00-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>)

Set 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>)

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>)

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, float phase)

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

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.00-35 and up

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

C: rp_GenGetLoadMode(rp_channel_t channel, float *phase)

Python: rp_GenGetLoadMode(<channel>)

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

2.00-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

-



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.

2.00-18 and up

-



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

-



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.

2.00-18 and up

-



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

2.3.5.1.7.4. 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.

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: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>: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

2.3.5.1.7.5. 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

2.3.5.1.7.5.1. 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}

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.00-35 and up

-



C++: stop()

Python: stop()

Stops the thread that generates frequencies.

2.00-35 and up

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

C++: setDefault()

Python: setDefault()

Stops sweep generation on all channels and sets default values.

in dev

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

C++: resetAll()

Python: resetAll()

Resets all channels at once.

2.00-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.00-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.00-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.00-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.00-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.00-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.00-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.00-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.00-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.00-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.00-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.00-35 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.00-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.00-35 and up

2.3.5.1.8. Acquisition

2.3.5.1.8.1. Acquisition Control

Parameter options:

  • <enable> = {true, false}

  • <n> = {1,2} (set channel IN1 or IN2)

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

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:START



C: rp_AcqStart()

Python: rp_AcqStart()

Start the acquisition.

1.04-18 and up

ACQ:START:CH<n>



C: rp_AcqStartCh(rp_channel_t channel)

Python: rp_AcqStartCh(<channel>)

Start the acquisition.
Used only in split trigger mode

in dev

ACQ:STOP



C: rp_AcqStop()

Python: rp_AcqStop()

Stop the acquisition.

1.04-18 and up

ACQ:STOP:CH<n>



C: rp_AcqStopCh(rp_channel_t channel)

Python: rp_AcqStopCh(<channel>)

Stop the acquisition.
Used only in split trigger mode

in dev

ACQ:RST



C: rp_AcqReset()

Python: rp_AcqReset()

Stop the acquisition and reset all acquisition parameters to
default values.


1.04-18 and up

ACQ:RST:CH<n>



C: rp_AcqResetCh(rp_channel_t channel)

Python: rp_AcqResetCh(<channel>)

Stop the acquisition and reset all acquisition parameters to
default values.
Used only in split trigger mode

in dev

ACQ:SPLIT:TRig <state>



C: rp_AcqResetCh(rp_channel_t channel)

Python: rp_AcqResetCh(<channel>)

Enables split trigger mode.

in dev

ACQ:SPLIT:TRig? > <state>



C: rp_AcqResetCh(rp_channel_t channel)

Python: rp_AcqResetCh(<channel>)

Returns the split trigger mode status

in dev

-



C: rp_AcqResetFpga()

Python: rp_AcqResetFpga()

Reset the acqusition writing state machine.

1.04-18 and up

-



C: rp_AcqSetArmKeep(bool enable)

Python: rp_AcqSetArmKeep(<enable>)

Enable continous acquisition even after trigger has happened.

1.04-18 and up

-



C: rp_AcqGetArmKeep(bool* state)

Python: rp_AcqGetArmKeep()

Get the status of continous acquisition after trigger setting.

1.04-18 and up

2.3.5.1.8.2. Acquisition settings

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <decimation> = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536} Default: 1

  • <decimation_ext> = {1, 2, 4, 8, 16, 17, 18, 19, ..., 65536} Default: 1

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

  • <state> = {LV, HV} Default: LV

  • <mode> = {AC, DC} Default DC

  • <units> = {RAW, VOLTS} Default VOLTS

  • <format> = {BIN, ASCII} Default ASCII

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

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Decimation - RP_DEC_1, RP_DEC_2, RP_DEC_4, RP_DEC_8, RP_DEC_16, RP_DEC_32, RP_DEC_64, RP_DEC_128, RP_DEC_256, RP_DEC_512, RP_DEC_1024, RP_DEC_2048, RP_DEC_4096, RP_DEC_8192, RP_DEC_16384, RP_DEC_32768, RP_DEC_65536

SIGNALlab 250-12 only (additional):

  • Input coupling - RP_DC, RP_AC

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:DEC <decimation>
Example:
ACQ:DEC 4

C: rp_AcqSetDecimation(rp_acq_decimation_t decimation)

Python: rp_AcqSetDecimation(<decimation>)

Set the decimation factor (power of 2 from 1 to 65536).



1.04-18 and up

ACQ:DEC:CH<n> <decimation>
Example:
ACQ:DEC:CH1 4

C: rp_AcqSetDecimationCh(rp_channel_t channel, rp_acq_decimation_t decimation)

Python: rp_AcqSetDecimationCh(<channel>, <decimation>)

Set the decimation factor (power of 2 from 1 to 65536).
Used only in split trigger mode


in dev

ACQ:DEC? > <decimation>
Example:
ACQ:DEC? > 1

C: rp_AcqGetDecimation(rp_acq_decimation_t* decimation)

Python: rp_AcqGetDecimation()

Get the decimation factor.

1.04-18 and up

ACQ:DEC:CH<n>? > <decimation>
Example:
ACQ:DEC:CH1? > 1

C: rp_AcqGetDecimationCh(rp_channel_t channel, rp_acq_decimation_t* decimation)

Python: rp_AcqGetDecimationCh(<channel>)

Get the decimation factor.
Used only in split trigger mode

in dev

ACQ:DEC:Factor <decimation_ext>
Example:
ACQ:DEC:Factor 17

C: rp_AcqSetDecimationFactor(uint32_t decimation)

Python: rp_AcqSetDecimationFactor(<decimation>)

Set the extended decimation factor (power of 2 up to 16 then any
whole number up to 65536).


2.00-30 and up

ACQ:DEC:Factor:CH<n> <decimation_ext>
Example:
ACQ:DEC:Factor:CH1 17

C: rp_AcqSetDecimationFactorCh(rp_channel_t channel, uint32_t decimation)

Python: rp_AcqSetDecimationFactorCh(<channel>, <decimation>)

Set the extended decimation factor (power of 2 up to 16 then any
whole number up to 65536).
Used only in split trigger mode

in dev

ACQ:DEC:Factor? > <decimation_ext>
Example:
ACQ:DEC:Factor? > 1

C: rp_AcqGetDecimationFactor(uint32_t* decimation)

Python: rp_AcqGetDecimationFactor()

Get the extended decimation factor.

2.00-30 and up

ACQ:DEC:Factor:CH<n>? > <decimation_ext>
Example:
ACQ:DEC:Factor:CH1? > 1

C: rp_AcqGetDecimationFactorCh(rp_channel_t channel, uint32_t* decimation)

Python: rp_AcqGetDecimationFactorCh(<channel>)

Get the extended decimation factor.
Used only in split trigger mode

in dev

-



C: rp_AcqConvertFactorToDecimation(uint32_t factor,rp_acq_decimation_t* decimation)

Python: rp_AcqConvertFactorToDecimation(<factor>)

Convert the decimation factor to the closest available decimation value
(closest power of 2).


1.04-18 and up

-



C: rp_AcqGetSamplingRateHz(float* sampling_rate)

Python: rp_AcqGetSamplingRateHz()

Get the current sampling rate in Hertz.



1.04-18 and up

ACQ:AVG <average>



C: rp_AcqSetAveraging(bool enabled)

Python: rp_AcqSetAveraging(<enable>)

Enable/disable averaging.
Each sample is the average of skipped samples if DEC > 1.


1.04-18 and up

ACQ:AVG? > <average>
Example:
ACQ:AVG? > ON

C: rp_AcqGetAveraging(bool *enabled)

Python: rp_AcqGetAveraging()

Get the averaging status.
Averages the skipped samples when DEC > 1


1.04-18 and up

ACQ:AVG:CH<n> <average>



C: rp_AcqSetAveragingCh(uint32_t factor, bool enabled)

Python: rp_AcqSetAveragingCh(<channel>, <enable>)

Enable/disable averaging.
Each sample is the average of skipped samples if DEC > 1.
Used only in split trigger mode

in dev

ACQ:AVG:CH<n>? > <average>
Example:
ACQ:AVG:CH1? > ON

C: rp_AcqGetAveragingCh(uint32_t factor, bool *enabled)

Python: rp_AcqGetAveragingCh(<channel>)

Get the averaging status.
Averages the skipped samples when DEC > 1
Used only in split trigger mode

in dev

ACQ:SOUR<n>:GAIN <state>

Example:
ACQ:SOUR1:GAIN LV
C: rp_AcqSetGain(rp_channel_t channel, rp_pinState_t state)

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

Set the gain for the specified channel to HIGH or LOW.
(For SIGNALlab 250-12 this is 1:20 and 1:1 attenuator).
The gain refers to jumper settings on the Red Pitaya fast analog input.

1.04-18 and up

ACQ:SOUR<n>:GAIN? > <state>

Example:
ACQ:SOUR1:GAIN? > HV
C: rp_AcqGetGain(rp_channel_t channel, rp_pinState_t* state)

Python: rp_AcqGetGain(<channel>)

Get the gain setting for the specified channel
(For SIGNALlab 250-12 this is 1:20 and 1:1 attenuator).


1.04-18 and up

-



C: rp_AcqGetGainV(rp_channel_t channel, float* voltage)

Python: rp_AcqGetGainV(<channel>)

Get specified channel gain in Volts.



1.04-18 and up

ACQ:SOUR<n>:COUP <mode>
Example:
ACQ:SOUR1:COUP AC

C: rp_AcqSetAC_DC(rp_channel_t channel,rp_acq_ac_dc_mode_t mode)

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

Set the AC / DC mode of the specified input (only SIGNALlab 250-12).

1.04-18 and up

ACQ:SOUR<n>:COUP? > <mode>
Example:
ACQ:SOUR1:COUP? > AC

C: rp_AcqGetAC_DC(rp_channel_t channel,rp_acq_ac_dc_mode_t *status)

Python: rp_AcqGetAC_DC(<channel>)

Get the AC / DC mode of the specified input (only SIGNALlab 250-12).

1.04-18 and up

ACQ:DATA:Units <units>
Example:
ACQ:DATA:Units RAW

C: - (See specific acquisition command)

Python: - (See specific acquisition command)

Select units in which the acquired data will be returned. For API commands
this depends on which function is called (see specific functions for
details).

1.04-18 and up

ACQ:DATA:Units? > <units>
Example:
ACQ:DATA:Units? > RAW

C: - (See specific acquisition command)

Python: - (See specific acquisition command)

Get units in which the acquired data will be returned.

1.04-18 and up

ACQ:DATA:FORMAT <format>
Example:
ACQ:DATA:FORMAT ASCII

C: - (N/A)

Python: - (N/A)

Select the format in which the acquired data will be returned.
Only for remote SCPI control.


1.04-18 and up

ACQ:BUF:SIZE? > <size>
Example:
ACQ:BUF:SIZE? > 16384

C: rp_AcqGetBufSize(uint32_t *size)

Python: rp_AcqGetBufSize(<buffer>)

Returns the buffer size.
For Python API specifically, the input parameter is the buffer itself.


1.04-18 and up

- (N/A)





C: - (look for malloc function online)

Python: rp_createBuffer(<maxChannels>, <length>, <initInt16>, <initDouble>, <initFloat>)



Performs memory allocation and returns the requested buffer.
- <maxChannels> - how many channels will be acquired
- <enght> - length of the buffer in samples (max 16384)
- <initInt16>, <initDouble>, <initFloat> - buffer sample type, set one
to true, others are false.
For Python API specifically.

2.00-18 and up

- (N/A)



C: - (look for free function online)

Python: rp_deleteBuffer(<buffer>)

Free the allocated resources.
- <buffer> - buffer to be released/freed
For Python API specifically.

2.00-18 and up

2.3.5.1.8.3. Acquisition trigger

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <source> = {DISABLED, NOW, CH1_PE, CH1_NE, CH2_PE, CH2_NE, EXT_PE, EXT_NE, AWG_PE, AWG_NE} Default: DISABLED

  • <state> = {WAIT, TD}

  • <fill_state> = {0, 1}

  • <decimated_data_num> = {value in samples} (minimum value -8192) Default: 0

  • <time_ns> = {value in ns} Default: 0

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

  • <voltage> = {value in V} Default: 0

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

  • <source> = {CH3_PE, CH3_NE, CH4_PE, CH4_NE}

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

  • Acquisition trigger - RP_TRIG_SRC_DISABLED, RP_TRIG_SRC_NOW, RP_TRIG_SRC_CHA_PE, RP_TRIG_SRC_CHA_NE, RP_TRIG_SRC_CHB_PE, RP_TRIG_SRC_CHB_NE, RP_TRIG_SRC_EXT_PE, RP_TRIG_SRC_EXT_NE, RP_TRIG_SRC_AWG_PE, RP_TRIG_SRC_AWG_NE

  • Acquisition trigger state - RP_TRIG_STATE_TRIGGERED, RP_TRIG_STATE_WAITING

  • Buffer size - ADC_BUFFER_SIZE, DAC_BUFFER_SIZE

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

  • Acquisition trigger - RP_TRIG_SRC_CHC_PE, RP_TRIG_SRC_CHC_NE, RP_TRIG_SRC_CHD_PE, RP_TRIG_SRC_CHD_NE

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:TRig <source>
Example:
ACQ:TRig CH1_PE

C: rp_AcqSetTriggerSrc(rp_acq_trig_src_t source)

Python: rp_AcqSetTriggerSrc(<source>)

Set acquisition trigger source. The options are disabled, trigger
immediately, or set trigger source & edge.


1.04-18 and up

ACQ:TRig:CH<n> <source>
Example:
ACQ:TRig:CH1 CH1_PE

C: rp_AcqSetTriggerSrc(rp_channel_t channel, rp_acq_trig_src_t source)

Python: rp_AcqSetTriggerSrc(<channel>, <source>)

Set acquisition trigger source. The options are disabled, trigger
immediately, or set trigger source & edge.
Used only in split trigger mode

in dev

-



C: rp_AcqGetTriggerSrc(rp_acq_trig_src_t* source)

Python: rp_AcqGetTriggerSrc()

Get acquisition trigger source.



1.04-18 and up

ACQ:TRig:STAT? > <state>
Example:
ACQ:TRig:STAT? > WAIT

C: rp_AcqGetTriggerState(rp_acq_trig_state_t* state)

Python: rp_AcqGetTriggerState()

Get acquisition trigger status. If the trigger is DISABLED or the
acquisition is triggered, the state is TD. Otherwise, it is WAIT.


1.04-18 and up

ACQ:TRig:STAT:CH<n>? > <state>
Example:
ACQ:TRig:STAT:CH1? > WAIT

C: rp_AcqGetTriggerStateCh(rp_channel_t channel, rp_acq_trig_state_t* state)

Python: rp_AcqGetTriggerStateCh(<channel>)

Get acquisition trigger status. If the trigger is DISABLED or the
acquisition is triggered, the state is TD. Otherwise, it is WAIT.
Used only in split trigger mode

in dev

ACQ:TRig:FILL? > <fill_state>
Example:
ACQ:TRig:FILL? > 1

C: rp_AcqGetBufferFillState(bool* state)

Python: rp_AcqGetBufferFillState()

Returns 1 if the buffer is full of data. Otherwise returns 0.

2.00-15 and up

ACQ:TRig:FILL:CH<n>? > <fill_state>
Example:
ACQ:TRig:FILL:CH1? > 1

C: rp_AcqGetBufferFillStateCh(rp_channel_t channel, bool* state)

Python: rp_AcqGetBufferFillStateCh(<channel>)

Returns 1 if the buffer is full of data. Otherwise returns 0.
Used only in split trigger mode

in dev

ACQ:TRig:DLY <decimated_data_num>
Example:
ACQ:TRig:DLY 2314

C: rp_AcqSetTriggerDelay(int32_t decimated_data_num)

Python: rp_AcqSetTriggerDelay(<decimated_data_num>)

Set the trigger delay in samples. The triggering moment is by default in
the middle of acquired buffer (at 8192th sample) (trigger delay set to 0).


1.04-18 and up

ACQ:TRig:DLY:CH<n> <decimated_data_num>
Example:
ACQ:TRig:DLY:CH1 2314

C: rp_AcqSetTriggerDelayCh(rp_channel_t channel, int32_t decimated_data_num)

Python: rp_AcqSetTriggerDelayCh(<channel>,<decimated_data_num>)

Set the trigger delay in samples. The triggering moment is by default in
the middle of acquired buffer (at 8192th sample) (trigger delay set to 0).
Used only in split trigger mode

in dev

ACQ:TRig:DLY? > <decimated_data_num>
Example:
ACQ:TRig:DLY? > 2314

C: rp_AcqGetTriggerDelay(int32_t* decimated_data_num)

Python: rp_AcqGetTriggerDelay()

Get the trigger delay in samples.

1.04-18 and up

ACQ:TRig:DLY:CH<n>? > <decimated_data_num>
Example:
ACQ:TRig:DLY:CH1? > 2314

C: rp_AcqGetTriggerDelayCh(rp_channel_t channel, int32_t* decimated_data_num)

Python: rp_AcqGetTriggerDelayCh(<channel>)

Get the trigger delay in samples. | Used only in split trigger mode

in dev

ACQ:TRig:DLY:NS <time_ns>
Example:
ACQ:TRig:DLY:NS 128

C: rp_AcqSetTriggerDelayNs(int64_t time_ns)

Python: rp_AcqSetTriggerDelayNs(<time_ns>)

Set the trigger delay in ns. Must be multiple of the board’s clock
resolution (125 MHz clock == 8 ns resolution, 250 MHz == 4 ns resolution).


1.04-18 and up

ACQ:TRig:DLY:NS:CH<n> <time_ns>
Example:
ACQ:TRig:DLY:NS:CH1 128

C: rp_AcqSetTriggerDelayNsCh(rp_channel_t channel, int64_t time_ns)

Python: rp_AcqSetTriggerDelayNsCh(<channel>,<time_ns>)

Set the trigger delay in ns. Must be multiple of the board’s clock
resolution (125 MHz clock == 8 ns resolution, 250 MHz == 4 ns resolution).
Used only in split trigger mode

in dev

ACQ:TRig:DLY:NS? > <time_ns>
Example:
ACQ:TRig:DLY:NS? > 128 ns

C: rp_AcqGetTriggerDelayNs(int64_t* time_ns)

Python: rp_AcqGetTriggerDelayNs()

Get the trigger delay in ns.

1.04-18 and up

ACQ:TRig:DLY:NS:CH<n>? > <time_ns>
Example:
ACQ:TRig:DLY:NS:CH1? > 128 ns

C: rp_AcqGetTriggerDelayNsCh(rp_channel_t channel, int64_t* time_ns)

Python: rp_AcqGetTriggerDelayNsCh(<channel>)

Get the trigger delay in ns. | Used only in split trigger mode

in dev

-



C: rp_AcqGetPreTriggerCounter(uint32_t* value)

Python: rp_AcqGetPreTriggerCounter()

Get the pretrigger sample count (how many samples are in the buffer before
the trigger position).


1.04-18 and up

ACQ:TRig:HYST <voltage>
Example:
ACQ:TRig:HYST 0.005

C: rp_AcqSetTriggerHyst(float voltage)

Python: rp_AcqSetTriggerHyst(<voltage>)

Set the trigger hysteresis threshold value in Volts.

1.04-18 and up

ACQ:TRig:HYST? > <voltage>
Example:
ACQ:TRig:HYST? > 0.005 V

C: rp_AcqGetTriggerHyst(float* voltage)

Python: rp_AcqGetTriggerHyst()

Get the trigger hysteresis threshold value in Volts.

1.04-18 and up

ACQ:TRig:LEV <voltage>
Example:
ACQ:TRig:LEV 0.125 V

C: rp_AcqSetTriggerLevel(rp_channel_trigger_t channel, float voltage)

Python: rp_AcqSetTriggerLevel(<channel>, <voltage>)

Set the trigger level in V.

1.04-18 and up

ACQ:TRig:LEV:CH<n> <voltage>
Example:
ACQ:TRig:LEV:CH1 0.125 V

C: rp_AcqSetTriggerLevel(rp_channel_trigger_t channel, float voltage)

Python: rp_AcqSetTriggerLevel(<channel>, <voltage>)

Set the trigger level in V.
Used only in split trigger mode

in dev

ACQ:TRig:LEV? > <voltage>
Example:
ACQ:TRig:LEV? > 0.123 V

C: rp_AcqGetTriggerLevel(rp_channel_trigger_t channel, float* voltage)

Python: rp_AcqGetTriggerLevel(<channel>)

Get the trigger level in V.

1.04-18 and up

ACQ:TRig:LEV:CH<n>? > <voltage>
Example:
ACQ:TRig:LEV:CH1? > 0.123 V

C: rp_AcqGetTriggerLevel(rp_channel_trigger_t channel, float* voltage)

Python: rp_AcqGetTriggerLevel(<channel>)

Get the trigger level in V.
Used only in split trigger mode

in dev

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

C: rp_AcqSetTriggerLevel(rp_channel_trigger_t channel, float voltage)

Python: rp_AcqSetTriggerLevel(<channel>, <voltage>)

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

1.04-18 - 2.00-30

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

C: rp_AcqGetTriggerLevel(rp_channel_trigger_t channel, float* voltage)

Python: rp_AcqGetTriggerLevel(<channel>)

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

1.04-18 - 2.00-30

ACQ:TRig:EXT:DEBouncer:[US] <value>
Example:
ACQ:TRig:EXT:DEBouncer:US 1

C: rp_AcqSetExtTriggerDebouncerUs(double value)

Python: rp_AcqSetExtTriggerDebouncerUs(<value>)

Set the external trigger acquisition debouncer in microseconds (value must
be positive).


2.00-15 and up

ACQ:TRig:EXT:DEBouncer:[US]? > <value>
Example:
ACQ:TRig:EXT:DEBouncer:US? > 1

C: rp_AcqGetExtTriggerDebouncerUs(double *value)

Python: rp_AcqGetExtTriggerDebouncerUs()

Set the external trigger acquisition debouncer 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.00-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.00-35 and up

2.3.5.1.8.4. Data pointers

The data is written into a circular buffer, which is constantly overwritten, until the triggering moment. Consequently, the trigger position can be anywhere inside the circular buffer, even though it is displayed to happen at approximately 8192nd sample in the acquired data (is affected by the ACQ:TRIG:DLY command).

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <pos> = {position inside circular buffer} (0 … 16383)

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:WPOS? > <pos>
Example:
ACQ:WPOS? > 1024

C: rp_AcqGetWritePointer(uint32_t* pos)

Python: rp_AcqGetWritePointer()

Returns the current position of the write pointer,
i.e the index of the most recent sample in the buffer.


1.04-18 and up

ACQ:TPOS? > <pos>
Example:
ACQ:TPOS? > 512

C: rp_AcqGetWritePointerAtTrig(uint32_t* pos)

Python: rp_AcqGetWritePointerAtTrig()

Returns the position where the trigger event appeared.

1.04-18 and up

ACQ:WPOS:CH<n>? > <pos>
Example:
ACQ:WPOS:CH1? > 1024

C: rp_AcqGetWritePointerCh(rp_channel_t channel, uint32_t* pos)

Python: rp_AcqGetWritePointerCh(<channel>)

Returns the current position of the write pointer,
i.e the index of the most recent sample in the buffer.
Used only in split trigger mode

in dev

ACQ:TPOS:CH<n>? > <pos>
Example:
ACQ:TPOS:CH1? > 512

C: rp_AcqGetWritePointerAtTrigCh(rp_channel_t channel, uint32_t* pos)

Python: rp_AcqGetWritePointerAtTrigCh(<channel>)

Returns the position where the trigger event appeared.
Used only in split trigger mode

in dev

2.3.5.1.8.5. Data read

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <start_pos>, <end_pos>, <pos> = {0, 1, ..., 16383}

  • <buffer> Array to store the data into. For Python API use rp_createBuffer and for C API use malloc.

  • <buffer_size> Size of the array for data storage.

  • <t_pos> = {PRE_TRIG, POST_TRIG, PRE_POST_TRIG} Buffer reading direction mode relative to trigger

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:SOUR<n>:DATA:STArt:End?
<start_pos>,<end_pos>
Example:
ACQ:SOUR1:DATA:STArt:End? 10,13 >
{123,231,-231}
C: rp_AcqGetDataPosRaw(rp_channel_t channel, uint32_t start_pos, uint32_t end_pos, int16_t* buffer, uint32_t* buffer_size)
rp_AcqGetDataPosV(rp_channel_t channel, uint32_t start_pos, uint32_t end_pos, float* buffer, uint32_t* buffer_size)
Python: rp_AcqGetDataPosRaw(<channel>, <start_pos>, <end_pos>, <buffer>, <buffer_size>)
rp_AcqGetDataPosV(<channel>, <start_pos>, <end_pos>, <buffer>, <buffer_size>)

Read samples from start to end position. For API commands, the buffer for data
storage and its size must also be provided. Use rp_createBuffer to allocate data
for Python and malloc for C. API commands have two functions to return data in
Volts or RAW.

1.04-18 and up

-




C: rp_AcqGetDataRawWithCalib(rp_channel_t channel,  uint32_t pos, uint32_t* size, int16_t* buffer)

Python: rp_AcqGetDataRawWithCalib(<channel>, <pos>, <size>, <buffer>)


Read <size> samples from the <pos> onwards. The data is returned in RAW
format with calibration applied.



1.04-18 and up

-




C: rp_AcqGetNormalizedDataPos(uint32_t pos)

Python: rp_AcqGetNormalizedDataPos(<pos>)


Normalizes the ADC buffer position. Returns the modulo operation of ADC buffer size.




1.04-18 and up

ACQ:SOUR<n>:DATA:STArt:N?
<start_pos>,<size>
Example:
ACQ:SOUR1:DATA:STArt:N? 10,3 >
{1.2,3.2,-1.2}
C: rp_AcqGetDataRaw(rp_channel_t channel,  uint32_t pos, uint32_t* size, int16_t* buffer)
rp_AcqGetDataV(rp_channel_t channel, uint32_t pos, uint32_t* size, float* buffer)
Python: rp_AcqGetDataRaw(<channel>, <pos>, <size>, <buffer>)
rp_AcqGetDataV(<channel>, <pos>, <size>, <buffer>)

Read size samples from the <start_pos> onwards.




1.04-18 and up

ACQ:SOUR<n>:DATA?
Example:
ACQ:SOUR2:DATA? >
{1.2,3.2,...,-1.2}

C: rp_AcqGetOldestDataRaw(rp_channel_t channel, uint32_t* size, int16_t* buffer)
rp_AcqGetOldestDataV(rp_channel_t channel, uint32_t* size, float* buffer)
Python: rp_AcqGetOldestDataRaw(<channel>, <size>, <buffer>)
rp_AcqGetOldestDataV(<channel>, <size>, <buffer>)

Read the full buffer.
Starting from the oldest sample in the buffer (first sample after trigger delay).
If the trigger delay is set to zero, it will read the full buffer size starting
from the trigger.

1.04-18 and up

ACQ:SOUR<n>:DATA:Old:N? <size>
Example:
ACQ:SOUR2:DATA:Old:N? 3 >
{1.2,3.2,-1.2}

C: rp_AcqGetOldestDataRaw(rp_channel_t channel, uint32_t* size, int16_t* buffer)
rp_AcqGetOldestDataV(rp_channel_t channel, uint32_t* size, float* buffer)
Python: rp_AcqGetOldestDataRaw(<channel>, <size>, <buffer>)
rp_AcqGetOldestDataV(<channel>, <size>, <buffer>)

Read <size> samples after the trigger delay, starting from the oldest sample
in the buffer (first sample after trigger delay).
The trigger delay is set to zero by default (in samples or in seconds).
If the trigger delay is set to zero, it will read m samples starting
from the trigger.

1.04-18 and up

ACQ:SOUR<n>:DATA:LATest:N? <size>
Example:
ACQ:SOUR1:DATA:LAT:N? 3 >
{1.2,3.2,-1.2}
C: rp_AcqGetLatestDataRaw(rp_channel_t channel, uint32_t* size, int16_t* buffer)
rp_AcqGetLatestDataV(rp_channel_t channel, uint32_t* size, float* buffer)
Python: rp_AcqGetLatestDataRaw(<channel>, <size>, <buffer>)
rp_AcqGetLatestDataV(<channel>, <size>, <buffer>)
Read <size> samples before the trigger delay.
The trigger delay is set to zero by default (in samples or in seconds).
If the trigger delay is set to zero, it will read m samples before the trigger.

1.04-18 and up

ACQ:SOUR<n>:DATA:TRig? <size>,<t_pos>
Example:
ACQ:SOUR1:DATA:TRig? 3,POST_TRIG >
{1.2,3.2,-1.2}
C: rp_AcqGetDataRaw(rp_channel_t channel,  uint32_t pos, uint32_t* size, int16_t* buffer)
rp_AcqGetDataV(rp_channel_t channel, uint32_t pos, uint32_t* size, float* buffer)
Python: rp_AcqGetDataRaw(<channel>, <pos>, <size>, <buffer>)
rp_AcqGetDataV(<channel>, <pos>, <size>, <buffer>)
Read <size> relative to the trigger, depending on the setting.
PRE, POST trigger configuration returns data in the amount specified in size.
PRE_POST_TRIG returns data in size * 2 + 1.

in dev

2.3.5.1.9. Deep Memory Acquisition (DMA)

2.3.5.1.9.1. DMA settings

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <byte> = {0...} in bytes

  • <decimation> = {1, 2, 4, 8, 16, 17, 18, 19, ..., 65534, 65535, 65536} Default: 1

  • <decimated_data_num> = {value in samples} Default: 0

  • <pos> = {position inside circular buffer in samples}

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

  • <address> = {byte} Address of reserved memory

  • <size> = {byte} Size of buffer in bytes. Default: 2 MB

  • <samples> = {sample} Size of the acquisition buffer in samples. Default: 2 MB

  • <units> = {RAW, VOLTS} Default: VOLTS

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:AXI:START? > <byte>
Example:
ACQ:AXI:START? > 16777216

C: rp_AcqAxiGetMemoryRegion(uint32_t *_start,uint32_t *_size)

Python: rp_AcqAxiGetMemoryRegion()

Returns the start address of the Deep Memory region.
API: Also returns the size of the memory region.
This can also be achieved by displaying values of ADC_AXI_START
and ADC_AXI_END macros.

2.00-18 and up

ACQ:AXI:SIZE? > <byte>
Example:
ACQ:AXI:SIZE? > 2097152

C: rp_AcqAxiGetMemoryRegion(uint32_t *_start,uint32_t *_size)

Python: rp_AcqAxiGetMemoryRegion()

Get size of reserved memory for Deep Memory mode.
API: Also returns the start address of the memory region.
This can also be achieved by displaying values of ADC_AXI_START
and ADC_AXI_END macros.

2.00-18 and up

ACQ:AXI:DEC <decimation>
Example:
ACQ:AXI:DEC 4

C: rp_AcqAxiSetDecimationFactor(uint32_t decimation)

Python: rp_AcqAxiSetDecimationFactor(<decimation>)

Sets the decimation used at acquiring signal for the Deep Memory Mode.

2.00-18 and up

ACQ:AXI:DEC? > <decimation>
Example:
ACQ:AXI:DEC? > 1

C: rp_AcqAxiGetDecimationFactor(uint32_t *decimation)

Python: rp_AcqAxiGetDecimationFactor()

Returns the decimation used for acquiring signal for the Deep Memory Mode.

2.00-18 and up

ACQ:AXI:DEC:CH<n> <decimation>
Example:
ACQ:AXI:DEC:CH1 4

C: rp_AcqAxiSetDecimationFactorCh(rp_channel_t channel, uint32_t decimation)

Python: rp_AcqAxiSetDecimationFactorCh(<channel>, <decimation>)

Sets the decimation used at acquiring signal for the Deep Memory Mode.
Used only in split trigger mode

in dev

ACQ:AXI:DEC:CH<n>? > <decimation>
Example:
ACQ:AXI:DEC:CH1? > 1

C: rp_AcqAxiGetDecimationFactorCh(rp_channel_t channel, uint32_t *decimation)

Python: rp_AcqAxiGetDecimationFactorCh(<channel>)

Returns the decimation used for acquiring signal for the Deep Memory Mode.
Used only in split trigger mode

in dev

ACQ:AXI:SOUR<n>:ENable <enable>
Example:
ACQ:AXI:SOUR1:ENable ON

C: rp_AcqAxiEnable(rp_channel_t channel, bool enable)

Python: rp_AcqAxiEnable(<channel>, <enable>)

Sets the Deep Memory enable state.

2.00-18 and up

ACQ:AXI:SOUR<n>:Trig:Dly <decimated_data_num>
Example:
ACQ:AXI:SOUR1:Trig:Dly 2314

C: rp_AcqAxiSetTriggerDelay(rp_channel_t channel, int32_t decimated_data_num)

Python: rp_AcqAxiSetTriggerDelay(<channel>, <decimated_data_num>)

Sets the number of decimated data after the trigger is
written into memory.


2.00-18 and up

ACQ:AXI:SOUR<n>:Trig:Dly? > <decimated_data_num>
Example:
ACQ:AXI:SOUR1:Trig:Dly? > 2314

C: rp_AcqAxiGetTriggerDelay(rp_channel_t channel, int32_t *decimated_data_num)

Python: rp_AcqAxiGetTriggerDelay(<channel>)

Returns the number of decimated data after the trigger is
written into memory.


2.00-18 and up

ACQ:AXI:SOUR<n>:SET:Buffer <address>,<size>
Example:
ACQ:AXI:SOUR<n>:SET:Buffer 16777216,512

C: rp_AcqAxiSetBufferSamples(rp_channel_t channel, uint32_t address, uint32_t samples)
rp_AcqAxiSetBufferBytes(rp_channel_t channel, uint32_t address, uint32_t size)
Python: rp_AcqAxiSetBufferSamples(<channel>, <address>, <samples>)
rp_AcqAxiSetBufferBytes(<channel>, <address>, <size>)
Sets the Deep Memory buffer address and size in samples.
Buffer size must be a multiple of 2.


2.00-18 and up

ACQ:AXI:DATA:UNITS <units>
Example:
ACQ:AXI:DATA:UNITS RAW

C: - (see rp_AcqAxiGetDataV and rp_AcqAxiGetDataRaw)

Python: - (see rp_AcqAxiGetDataV and rp_AcqAxiGetDataRaw)

Select units in which the acquired data will be returned.
For API commands the units are selected with the get data function.


2.00-18 and up

ACQ:AXI:DATA:UNITS? > <units>
Example:
ACQ:AXI:DATA:UNITS? > RAW

C: - (see rp_AcqAxiGetDataV and rp_AcqAxiGetDataRaw)

Python: - (see rp_AcqAxiGetDataV and rp_AcqAxiGetDataRaw)

Get units in which the acquired data will be returned.
For API commands the units are selected with the get data function.


2.00-18 and up

- (NA)





C: - (look for malloc function online)

Python: rp_createBuffer(<maxChannels>, <length>, <initInt16>, <initDouble>, <initFloat>)



Performs memory allocation and returns the requested buffer.
- <maxChannels> - how many channels will be acquired
- <enght> - length of the buffer in samples (max 16384)
- <initInt16>, <initDouble>, <initFloat> - buffer sample type, set one
to true, others are false.
For Python API specifically.

2.00-18 and up

- (NA)



C: - (look for free function online)

Python: rp_deleteBuffer(<buffer>)

Free the allocated resources.
- <buffer> - buffer to be released/freed
For Python API specifically.

2.00-18 and up

2.3.5.1.9.2. DMA data read

Parameter options:

  • <n> = {1,2} (set channel IN1 or IN2)

  • <count> = {value in samples} Default: 0

  • <pos> = {samples} Position inside circular buffer in samples

  • <size> = {samples} Size of acquired data in samples

  • <buffer> Array to store the data into. For Python API use rp_createBuffer and for C API use malloc.

STEMlab 125-14 4-Input only (additional):

  • <n> = {3,4} (set channel IN3, or IN4)

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

ACQ:AXI:SOUR<n>:TRIG:FILL?
Example:
ACQ:AXI:SOUR1:TRIG:FILL? > 1

C: rp_AcqAxiGetBufferFillState(rp_channel_t channel, bool* state)

Python: rp_AcqAxiGetBufferFillState(<channel>)

Indicates whether the Deep Memory buffer was full of data.

2.00-18 and up

ACQ:AXI:SOUR<n>:Write:Pos? > <pos>
Example:
ACQ:AXI:SOUR1:Write:Pos? > 1024

C: rp_AcqAxiGetWritePointer(rp_channel_t channel, uint32_t* pos)

Python: rp_AcqAxiGetWritePointer(<channel>)

Returns current position of the Deep Memory write pointer.



2.00-18 and up

ACQ:AXI:SOUR<n>:Trig:Pos? > <pos>
Example:
ACQ:AXI:SOUR1:Trig:Pos? > 512

C: rp_AcqAxiGetWritePointerAtTrig(rp_channel_t channel, uint32_t* pos)

Python: rp_AcqAxiGetWritePointerAtTrig(<channel>)

Returns position of Deep Memory write pointer at time when
the trigger arrived.


2.00-18 and up

ACQ:AXI:SOUR<n>:DATA:Start:N? <pos>,<size>
Example:
ACQ:AXI:SOUR1:DATA:Start:N? 20,3 >
{1.2,3.2,-1.2}

C: rp_AcqAxiGetDataV(rp_channel_t channel, uint32_t pos, uint32_t* size, float* buffer)
rp_AcqAxiGetDataRaw(rp_channel_t channel,  uint32_t pos, uint32_t* size, int16_t* buffer)
Python: rp_AcqAxiGetDataV(<channel>, <pos>, <size>, <buffer>)
rp_AcqAxiGetDataRaw(<channel>, <pos>, <size>, <buffer>)

Read count samples from the pos position onwards.
SCPI: Returns the value as a text array of values or a byte array.
Depending on the ACQ:AXI:DATA:UNITS setting.
API: Returns the Deep Memory buffer in specified units from specified
position and desired size.

2.00-18 and up

2.3.5.1.10. UART

Parameter options:

  • <bits> = {CS6, CS7, CS8} Default: CS8

  • <stop> = {STOP1, STOP2} Default: STOP1

  • <parity> = {NONE, EVEN, ODD, MARK, SPACE} Default: NONE

  • <timeout> = {0...255} in (1/10 seconds) Default: 0

  • <speed> = {1200,2400,4800,9600,19200,38400,57600,115200,230400,576000,921000,1000000,1152000,1500000,2000000,2500000,3000000,3500000,4000000} Default: 9600

  • <data> = {XXX, ... | #HXX, ... | #QXXX, ... | #BXXXXXXXX, ... } Array of data separated by commas

    • XXX = Dec format

    • #HXX = Hex format

    • #QXXX = Oct format

    • #BXXXXXXXX = Bin format

Available Jupyter and API macros:

  • (Future OS release)

Note

When establishing UART communication with Red Pitaya and another device, do not forget to connect the External Common Mode (GND) pin (in addition to the RX and TX pins). Otherwise, the communication might be unreliable.

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

UART:INIT
Example:
UART:INIT

C: rp_UartInit()

Python: ~

Initialises the API for working with UART.

1.04-18 and up

UART:RELEASE
Example:
UART:RELEASE

C: rp_UartRelease()

Python: ~

Releases all used resources.

1.04-18 and up

UART:SETUP
Example:
UART:SETUP

C: rp_UartSetSettings()

Python: ~

Applies specified settings to UART.
Should be executed after communication parameters are set

1.04-18 and up

UART:BITS <bits>
Example:
UART:BITS CS7

C: rp_UartSetBits(rp_uart_bits_size_t _size)

Python: ~

Sets the character size in bits.

1.04-18 and up

UART:BITS? > <bits>
Example:
UART:BITS? > CS7

C: rp_UartGetBits(rp_uart_bits_size_t *value)

Python: ~

Gets the character size in bits.

1.04-18 and up

UART:SPEED <speed>
Example:
UART:SPEED 115200

C: rp_UartSetSpeed(int value)

Python: ~

Sets the speed of the UART connection.

1.04-18 and up

UART:SPEED? > <speed>
Example:
UART:SPEED? > 115200

C: rp_UartGetSpeed(int *value)

Python: ~

Gets the speed of the UART connection.

1.04-18 and up

UART:STOPB <stop>
Example:
UART:STOPB STOP2

C: rp_UartSetStopBits(rp_uart_stop_bits_t _size)

Python: ~

Sets the length of the stop bit.

1.04-18 and up

UART:STOPB? > <stop>
Example:
UART:STOPB? > STOP2

C: rp_UartGetStopBits(rp_uart_stop_bits_t *value)

Python: ~

Gets the length of the stop bit.

1.04-18 and up

UART:PARITY <parity>
Example:
UART:PARITY ODD



C: rp_UartSetParityMode(rp_uart_parity_t mode)

Python: ~



Sets parity check mode.
- NONE = Disable parity check
- EVEN = Set even mode for parity
- ODD = Set odd mode for parity
- MARK = Set Always 1
- SPACE = Set Always 0

1.04-18 and up

UART:PARITY? > <parity>
Example:
UART:PARITY? > ODD

C: rp_UartGetParityMode(rp_uart_parity_t *value)

Python: ~

Gets parity check mode.

1.04-18 and up

UART:TIMEOUT <timeout>
Example:
UART:TIMEOUT 10

C: rp_UartSetTimeout(uint8_t deca_sec)

Python: ~

Sets the timeout for reading from UART. 0 - Disable timeout. 1 = 1/10 sec.
Example: 10 - 1 sec. Max timeout: 25.5 sec

1.04-18 and up

UART:TIMEOUT? > <timeout>
Example:
UART:TIMEOUT? > 10

C: rp_UartGetTimeout(uint8_t *value)

Python: ~

Gets the timeout.

1.04-18 and up

UART:WRITE<n> <data>
Example:
UART:WRITE5 1,2,3,4,5

C: rp_UartWrite(unsigned char *buffer, int size)

Python: ~

Writes data to UART. <n> - the length of data sent to UART.

1.04-18 and up

UART:READ<n>? > <data>
Example:
UART:READ5? > {1,2,3,4,5}

C: rp_UartRead(unsigned char *buffer, int *size)

Python: ~

Reads data from UART. <n> - the length of data retrieved from UART.

1.04-18 and up

2.3.5.1.11. SPI

Parameter options:

  • <mode> = {LISL, LIST, HISL, HIST} Default: LISL

  • <cs_mode> = {NORMAL, HIGH} Default: NORMAL

  • <bits> = {7, 8} Default: 8

  • <speed> = {1...100000000} Default: 50000000

  • <data> = {XXX, ... | #HXX, ... | #QXXX, ... | #BXXXXXXXX, ... } Array of data separated by commas

    • XXX = Dec format

    • #HXX = Hex format

    • #QXXX = Oct format

    • #BXXXXXXXX = Bin format

Available Jupyter and API macros:

  • (Future OS release)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

SPI:INIT
Example:
SPI:INIT

C: rp_SPI_Init()

Python:

Initializes the API for working with SPI.

1.04-18 and up

SPI:INIT:DEV <path>
Example:
SPI:INIT:DEV "/dev/spidev1.0"

C: rp_SPI_InitDevice(const char *_device)

Python:

Initializes the API for working with SPI. <path> - Path to the SPI device.
On some boards, it may be different from the standard: /dev/spidev1.0


1.04-18 and up

SPI:RELEASE
Example:

SPI:RELEASE
C: rp_SPI_Release()


Python:

Releases all used resources.

1.04-18 and up

SPI:SETtings:DEFault
Example:
SPI:SETtings:DEFault

C: rp_SPI_SetDefaultSettings()

Python:

Sets the settings for SPI to default values.

1.04-18 and up

SPI:SETtings:SET
Example:
SPI:SETtings:SET

C: rp_SPI_SetSettings()

Python:

Sets the specified settings for SPI.
Executed after specifying the parameters of communication.


1.04-18 and up

SPI:SETtings:GET
Example:
SPI:SETtings:GET

C: rp_SPI_GetSettings()

Python:

Gets the specified SPI settings.

1.04-18 and up

SPI:SETtings:MODE <mode>
Example:
SPI:SETtings:MODE LIST


C: rp_SPI_SetMode(rp_spi_mode_t mode)

Python:


Sets the mode for SPI.
- LISL = Low idle level, Sample on leading edge
- LIST = Low idle level, Sample on trailing edge
- HISL = High idle level, Sample on leading edge
- HIST = High idle level, Sample on trailing edge

1.04-18 and up

SPI:SETtings:MODE? > <mode>
Example:
SPI:SETtings:MODE? > LIST

C: rp_SPI_GetMode(rp_spi_mode_t *mode)

Python:

Gets the specified mode for SPI.

1.04-18 and up

SPI:SETtings:CSMODE <cs_mode>
Example:
SPI:SETtings:CSMODE NORMAL


C: rp_SPI_SetCSMode(rp_spi_cs_mode_t mode)

Python:


Sets the mode for CS.
- NORMAL = After the message is transmitted,
the CS line is set to the HIGH state.
- HIGH = After the message has been transmitted,
the CS line is set to the LOW state.

2.00-18 and up

SPI:SETtings:CSMODE? > <cs_mode>
Example:
SPI:SETtings:CSMODE? > NORMAL

C: rp_SPI_GetState(rp_spi_state_t *state)

Python:

Gets the specified CS mode for SPI.

2.00-18 and up

SPI:SETtings:SPEED <speed>
Example:
SPI:SETtings:SPEED 1000000

C: rp_SPI_SetSpeed(int speed)

Python:

Sets the speed of the SPI connection.

1.04-18 and up

SPI:SETings:SPEED? > <speed>
Example:
SPI:SETtings:SPEED? > 1000000

C: rp_SPI_GetSpeed(int *speed)

Python:

Gets the speed of the SPI connection.

1.04-18 and up

SPI:SETtings:WORD <bits>
Example:
SPI:SETtings:WORD 8

C: rp_SPI_SetWordLen(int len)

Python:

Specifies the length of the word in bits. Must be greater than or equal to 7.

1.04-18 and up

SPI:SETtings:WORD? > <bits>
Example:
SPI:SETtings:WORD? > 8

C: rp_SPI_GetWordLen(int *len)

Python:

Returns the length of a word.

1.04-18 and up

SPI:MSG:CREATE <n>
Example:
SPI:MSG:CREATE 1
C: rp_SPI_CreateMessage(size_t len)

Python:

Creates a message queue for SPI (reserves the space for data buffers)
Once created, they need to be initialized.
<n> - The number of messages in the queue.
The message queue can operate within a single CS state switch.

1.04-18 and up

SPI:MSG:DEL
Example:
SPI:MSG:DEL

C: rp_SPI_DestoryMessage()

Python:

Deletes all messages and data buffers allocated for them.

1.04-18 and up

SPI:MSG:SIZE? > <n>
Example:
SPI:MSG:SIZE? > 1

C: rp_SPI_GetMessageLen(size_t *len)

Python:

Returns the length of the message queue.

1.04-18 and up

SPI:MSG<n>:TX<m> <data>
SPI:MSG<n>:TX<m>:CS <data>
Example:
SPI:MSG0:TX4 1,2,3,4
SPI:MSG1:TX3:CS 2,3,4

C: rp_SPI_SetBufferForMessage(size_t msg,const uint8_t *tx_buffer,bool init_rx_buffer,size_t len, bool cs_change)

Python:



Sets data for the write buffer for the specified message.
CS - Toggles CS state after sending/receiving this message.
<n> - index of message 0 <= n < msg queue size.
<m> - TX buffer length.
Sends <m> ‘bytes’ from message <n>. No data is received.

1.04-18 and up

SPI:MSG<n>:TX<m>:RX <data>
SPI:MSG<n>:TX<m>:RX:CS <data>
Example:
SPI:MSG0:TX4:RX 1,2,3,4
SPI:MSG1:TX3:RX:CS 2,3,4



C: rp_SPI_SetBufferForMessage(size_t msg,const uint8_t *tx_buffer,bool init_rx_buffer,size_t len, bool cs_change)

Python:





Sets data for the read and write buffers for the specified message.
CS - Toggles CS state after sending/receiving this message.
<n> - index of message 0 <= n < msg queue size.
<m> - TX buffer length.
The read buffer is also created with the same length and initialized with zeros.

Sends <m> ‘bytes’ from message <n> and receives the same amount of data
from the dataline

1.04-18 and up

SPI:MSG<n>:RX<m>
SPI:MSG<n>:RX<m>:CS
Example:
SPI:MSG0:RX4
SPI:MSG1:RX5:CS


C: rp_SPI_SetBufferForMessage(size_t msg,const uint8_t *tx_buffer,bool init_rx_buffer,size_t len, bool cs_change)

Python:




Initializes a buffer for reading the specified message.
CS - Toggles CS state after receiving message.
<n> - index of message 0 <= n < msg queue size.
<m> - RX buffer length.

Receives <m> ‘bytes’ into message <n>. No data is transmitted.

1.04-18 and up

SPI:MSG<n>:RX? > <data>
Example:
SPI:MSG1:RX? > {2,4,5}

C: rp_SPI_GetRxBuffer(size_t msg,const uint8_t **buffer,size_t *len)

Python:

Returns a read buffer for the specified message.

1.04-18 and up

SPI:MSG<n>:TX? > <data>
Example:
SPI:MSG1:TX? > {2,4,5}

C: rp_SPI_GetTxBuffer(size_t msg,const uint8_t **buffer,size_t *len)

Python:

Returns the write buffer for the specified message.

1.04-18 and up

SPI:MSG<n>:CS? > ON|OFF
Example:
SPI:MSG1:CS? > ON

C: rp_SPI_GetCSChangeState(size_t msg,bool *cs_change)

Python:

Returns the setting for CS mode for the specified message.

1.04-18 and up

SPI:PASS
Example:
SPI:PASS

C: rp_SPI_ReadWrite()

Python:

Sends the prepared messages to the SPI device.

1.04-18 and up

2.3.5.1.12. I2C

Parameter options:

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

  • <value> = {XXX | #HXX | #QXXX | #BXXXXXXXX} Value in Decimal, Hexadecimal, Octal, or Binary format.

  • <data> = {XXX, ... | #HXX, ... | #QXXX, ... | #BXXXXXXXX, ... } Array of data values separated by commas.

    • XXX = Dec format

    • #HXX = Hex format

    • #QXXX = Oct format

    • #BXXXXXXXX = Bin format

Available Jupyter and API macros:

  • (Future OS release)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

I2C:DEV<addr> <path>
Example:
I2C:DEV80 "/dev/i2c-0"

C: rp_I2C_InitDevice(const char *_device,uint8_t addr)

Python:

Initializes settings for I2C.
- <path> - Path to the I2C device.
- <addr> - Device address on the I2C bus in dec format.

1.04-18 and up

I2C:DEV? > <addr>
Example:
I2C:DEV? > 80

C: rp_I2C_getDevAddress(int *address)

Python:

Returns the current address of the device.

1.04-18 and up

I2C:FMODE <mode>
Example:
I2C:FMODE ON

C: rp_I2C_setForceMode(bool force)

Python:

Enables forced bus operation even if the device is in use.

1.04-18 and up

I2C:FMODE? > <mode>
Example:
I2C:FMODE? > ON

C: rp_I2C_getForceMode(bool *value)

Python:

Gets the current forced mode setting.

1.04-18 and up

I2C:Smbus:Read<reg>? > <value>
Example:
I2C:Smbus:Read2? > 0

C: rp_I2C_SMBUS_Read(uint8_t reg,uint8_t *value)

Python:

Reads 8 bit data from the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.

1.04-18 and up

I2C:Smbus:Read<reg>:Word? > <value>
Example:
I2C:Smbus:Read2:Word? > 0

C: rp_I2C_SMBUS_ReadWord(uint8_t reg,uint16_t *value)

Python:

Reads 16 bit data from the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.

1.04-18 and up

I2C:Smbus:Read<reg>:Buffer<size>? >
<data>
Example:
I2C:Smbus:Read2:Buffer2? > {0,1}
C: rp_I2C_SMBUS_ReadBuffer(uint8_t reg, uint8_t *buffer, int *len)

Python:

Reads buffer data from the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.
<size> - Read data size.

1.04-18 and up

I2C:Smbus:Write<reg> <value>

Example:
I2C:Smbus:Write2 10
C: rp_I2C_SMBUS_Write(uint8_t reg,uint8_t value)

Python:

Writes 8-bit data to the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.

1.04-18 and up

I2C:Smbus:Write<reg>:Word <value>

Example:
I2C:Smbus:Write2:Word 10
C: rp_I2C_SMBUS_WriteWord(uint8_t reg,uint16_t value)

Python:

Writes 16-bit data to the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.

1.04-18 and up

I2C:Smbus:Write<reg>:Buffer<size> <data>

Example:
I2C:Smbus:Write2:Buffer2 0,1
C: rp_I2C_SMBUS_WriteBuffer(uint8_t reg, uint8_t *buffer, int len)

Python:

Writes buffer data to the specified register using
the SMBUS protocol.
<reg> - Register address in dec format.
<size> - Read data size.

1.04-18 and up

I2C:IOctl:Read:Buffer<size>? > <data>
Example:
I2C:IOctl:Read:Buffer2? > {0,1}

C: rp_I2C_IOCTL_ReadBuffer(uint8_t *buffer, int len)

Python:

Reads data from the I2C device through IOCTL.
<size> - Read data size.


1.04-18 and up

I2C:IOctl:Write:Buffer<size> <data>
Example:
I2C:IOctl:Write:Buffer2  {0,1}

C: rp_I2C_IOCTL_WriteBuffer(uint8_t *buffer, int len)

Python:

Writes data to the I2C device via IOCTL.
<size> - Read data size.


1.04-18 and up

Note

SMBUS is a standardized protocol for communicating with I2C devices. Information about this protocol can be found in this link: SMBUS specifcations. IOCTL writes and reads data directly from I2C.

2.3.5.1.13. CAN

Note

FPGA image v0.94 is required to work with CAN.

Parameter options:

  • <n> = {0,1} CAN interface

  • <bool> = {OFF, ON}

  • <state> = {ERROR_ACTIVE, ERROR_WARNING, ERROR_PASSIVE, BUS_OFF, STOPPED, SLEEPING}

  • <mode> = {LOOPBACK, BERR_REPORTING}

  • <speed> = {1, 10000000}

  • <sp> = {0, 0.999}

  • <tq> = {unsigned integer}

  • <prop_seg> = {unsigned integer}

  • <phase_seg1> = {unsigned integer}

  • <phase_seg2> = {unsigned integer}

  • <sjw> = {unsigned integer}

  • <brp> = {unsigned integer}

  • <tseg1_min> = {unsigned integer}

  • <tseg2_min> = {unsigned integer}

  • <tseg2_min> = {unsigned integer}

  • <tseg2_max> = {unsigned integer}

  • <sjw_max> = {unsigned integer}

  • <brp_min> = {unsigned integer}

  • <brp_max> = {unsigned integer}

  • <brp_inc> = {unsigned integer}

  • <limits> = {<tseg1_min>, <tseg2_min>, <tseg2_min>, <tseg2_max>, <sjw_max>, <brp_min>, <brp_max>, <brp_inc>}

  • <clock> = {1...10000000} in Hz

  • <tx_err> = {unsigned integer}

  • <rx_err> = {unsigned integer}

  • <rs_ms> = {unsigned integer} in milliseconds

  • <can_id> = {unsigned integer} Destination address on CAN bus

  • <buffer> = {XXX | XXX,XXX | XXX,XXX,XXX | XXX,...,XXX} Bytes for send from 0 to 8

  • <timeout> = {unsigned integer} in milliseconds. 0 - timeout disabled

  • <frame_header> = {unsigned integer}

  • <is_extended> = {0,1}

  • <is_error> = {0,1}

  • <is_rtr> = {0,1}

  • <frame> = {<can_id>, <frame_header>, <is_extended>, <is_error>, <is_rtr>, {<buffer>}}

  • <filter> = {unsigned integer}

  • <mask> = {unsigned integer}

Available Jupyter and API macros:

  • (Future OS release)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

CAN:FPGA <bool>
Example:
CAN:FPGA ON



C: rp_CanSetFPGAEnable

Python:



Enables FPGA forwarding from CAN controller to GPIO.

2.00-30 and up

CAN:FPGA? > <bool>
Example:
CAN:FPGA? > ON



C: rp_CanGetFPGAEnable

Python:



Gets the status from the FPGA of the CAN mode status.

2.00-30 and up

CAN<n>:START
Example:
CAN0:START



C: rp_CanStart

Python:



Sets the state of the specified interface to UP.

2.00-30 and up

CAN<n>:STOP
Example:
CAN0:STOP



C: rp_CanStop

Python:



Sets the state of the specified interface to DOWN.

2.00-30 and up

CAN<n>:RESTART
Example:
CAN0:RESTART



C: rp_CanRestart

Python:



Restarts the specified interface.

2.00-30 and up

CAN<n>:STATE? > <state>
Example:
CAN0:STATE? > ERROR_ACTIVE




C: rp_CanGetState

Python:




Returns the current state of the CAN interface.
ERROR_ACTIVE - RX/TX error count < 96
ERROR_WARNING - RX/TX error count < 128
ERROR_PASSIVE - RX/TX error count < 256
BUS_OFF - RX/TX error count >= 256
STOPPED - Device is stopped
SLEEPING - Device is sleeping

2.00-30 and up

CAN<n>:BITRate <speed>
Example:
CAN0:BITRate 200000



C: rp_CanSetBitrate

Python:



Sets the bitrate for the specified interface. Sample point is
set automatically.




2.00-30 and up

CAN<n>:BITRate:SP <speed>,<sp>
Example:
CAN0:BITRate:SP 200000,0.8



C: rp_CanSetBitrateAndSamplePoint

Python:



Sets the bitrate and sample point for the specified interface.

2.00-30 and up

CAN<n>:BITRate:SP? > <speed>,<sp>
Example:
CAN0:BITRate:SP? > 200000,0.8



C: rp_CanGetBitrateAndSamplePoint

Python:



Shows the real bit-rate in bits/sec and the sample-point in the
range 0.000…0.999. If the calculation of bit-timing parameters
is enabled in the kernel (CONFIG_CAN_CALC_BITTIMING=y), the
bit-timing can be defined by setting the “bitrate” argument.
Optionally, the “sample-point” can be specified. By default it’s
0.000 assuming CIA-recommended sample-points.

2.00-30 and up

CAN<n>:BITTiming <tq>,<prop_seg>,<phase_seg1>,<phase_seg2>,<sjw>,<brp>
Example:
CAN0:BITTiming 1000,1,2,1,1,10



C: rp_CanSetBitTiming

Python:



Set bit-timing settings.

2.00-30 and up

CAN<n>:BITTiming? > <tq>,<prop_seg>,<phase_seg1>,<phase_seg2>,<sjw>,<brp>
Example:
CAN0:BITTiming? > 1000,1,2,1,1,10



C: rp_CanGetBitTiming

Python:



Shows the time quanta in ns, propagation segment, phase buffer
segment 1 and 2, and the synchronisation jump width in units of
tq. They allow to define the CAN bit-timing in a hardware
independent format as proposed by the Bosch CAN 2.0 spec (Chapter 8).


2.00-30 and up

CAN<n>:BITTiming:Limits? > <limits>
Example:
CAN0:BITTiming:Limits? > 1,16,1,8,4,1,256,1



C: rp_CanGetBitTimingLimits

Python:



Shows the bit-timing constants of the CAN controller (here the
“sja1000”), the minimum and maximum values of the time segment 1
and 2, the synchronisation jump width in units of tq, the
bitrate pre-scaler, and the CAN system clock frequency in Hz.
These constants can be used for user-defined (non-standard)
bit-timing calculation algorithms in user-space.

2.00-30 and up

CAN<n>:CLOCK? > <clock>
Example:
CAN0:CLOCK? > 10000000



C: rp_CanGetClockFreq

Python:



Returns the clock value in Hz.

2.00-30 and up

CAN<n>:BUS:ERROR? > <tx_err>,<rx_err>
Example:
CAN0:BUS:ERROR? > 0,0



C: rp_CanGetBusErrorCounters

Python:



Returns the number of errors on the bus.

2.00-30 and up

CAN<n>:Restart:Time <rs_ms>
Example:
CAN0:Restart:Time 10



C: rp_CanSetRestartTime

Python:



Automatic restart delay time. If set to a non-zero value, a
restart of the CAN controller will be triggered automatically,
in case of a bus-off condition after the specified delay time
in milliseconds. By default it’s OFF.


2.00-30 and up

CAN<n>:Restart:Time? > <rs_ms>
Example:
CAN0:Restart:Time? > 10



C: rp_CanGetRestartTime

Python:



Returns current settings for restart-ms.

2.00-30 and up

CAN<n>:MODE <mode>,<bool>
Example:
CAN0:MODE LOOPBACK,ON



C: rp_CanSetControllerMode

Python:



Sets the controller mode.

2.00-30 and up

CAN<n>:MODE? <mode> > <bool>
Example:
CAN0:MODE? LOOPBACK > ON



C: rp_CanGetControllerMode

Python:



Checks the status of the selected mode.

2.00-30 and up

CAN<n>:OPEN
Example:
CAN0:OPEN



C: rp_CanOpen

Python:



Opens a socket connection for the specified interface.

2.00-30 and up

CAN<n>:CLOSE
Example:
CAN0:CLOSE



C: rp_CanClose

Python:



Closes an open connection.

2.00-30 and up

CAN<n>:Send<can_id> <buffer>
Example:
CAN0:Send123 1,2,3



C: rp_CanSend

Python:



Sends the frame to the specified address.

2.00-30 and up

CAN<n>:Send<can_id>:RTR <buffer>
Example:
Example:
CAN0:Send123 1,2,3



C: rp_CanSend

Python:




Sends the frame to the specified address marked as
the “Remote Transmission Request”.





2.00-30 and up

CAN<n>:Send<can_id>:Timeout<timeout> <buffer>
Example:
CAN0:Send123:Timeout2000 1,2,3



C: rp_CanSend

Python:



Sends the frame to the specified address.
There is a timeout for sending if the send buffer is full.




2.00-30 and up

CAN<n>:Send<can_id>:Ext
Example:
CAN0:Send123:Ext 1,2,3



C: rp_CanSend

Python:



Sends the extended frame to the specified address.
Sends an extended packet for can_id.




2.00-30 and up

CAN<n>:Send<can_id>:Timeout<timeout>:Ext <buffer>
Example:
CAN0:Send123:Timeout2000:Ext 1,2,3



C: rp_CanSend

Python:



Sends the extended frame to the specified address.
There is a timeout for sending if the send buffer is full.




2.00-30 and up

CAN<n>:Send<can_id>:Timeout<timeout>:RTR <buffer>
Example:
CAN0:Send123:Timeout2000:RTR 1,2,3



C: rp_CanSend

Python:



Sends the frame to the specified address marked as
the “Remote Transmission Request”.
There is a timeout for sending if the send buffer is full.



2.00-30 and up

CAN<n>:Send<can_id>:Ext:RTR
Example:
CAN0:Send123:Ext:RTR 1,2,3



C: rp_CanSend

Python:



Sends the extended frame to the specified address marked as
the “Remote Transmission Request”.
Sends an extended packet for can_id.



2.00-30 and up

CAN<n>:Send<can_id>:Timeout<timeout>:Ext:RTR <buffer>
Example:
CAN0:Send123:Timeout2000:Ext:RTR 1,2,3



C: rp_CanSend

Python:



Sends the extended frame to the specified address marked as
the “Remote Transmission Request”.
There is a timeout for sending if the send buffer is full.



2.00-30 and up

CAN<n>:Read? > <frame>
Example:
CAN0:Read? > 123,123,0,0,0,3,{1,2,3}



C: rp_CanRead

Python:



Reads from socket 1 frame.

2.00-30 and up

CAN<n>:Read:Timeout<timeout>? > <frame>
Example:
CAN0:Read:Timeout2000? > 123,123,0,0,0,3,{1,2,3}



C: rp_CanRead

Python:



Reads from socket 1 frame. Waits for the specified time,
otherwise returns an empty.




2.00-30 and up

CAN<n>:Filter:Add <filter>,<mask>
Example:
CAN0:Filter:Add 0,0



C: rp_CanAddFilter

Python:



Adds another filter to the list of filters.
Once all filters have been added, the command to
apply filters on the socket must be invoked CAN<n>:Filter:Set.
A filter matches, when
<received_can_id> & mask == filter & mask

2.00-30 and up

CAN<n>:Filter:Remove <filter>,<mask>
Example:
CAN0:Filter:Remove 0,0



C: rp_CanRemoveFilter

Python:



Deletes the specified filter from the filter list.

2.00-30 and up

CAN<n>:Filter:Clear
Example:
CAN0:Filter:Clear



C: rp_CanRemoveFilter

Python:



Removes all filters from the list.

2.00-30 and up

CAN<n>:Filter:Set
Example:
CAN0:Filter:Set



C: rp_CanSetFilter

Python:



Applies a list of filters to the socket connection.

2.00-30 and up

CAN<n>:SHOW:ERROR
Example:
CAN0:SHOW:ERROR



C: rp_CanShowErrorFrames

Python:



When this mode is enabled, all errors will be
converted through data frames with the error frame marking.




2.00-30 and up

2.3.5.1.14. Status LEDs

Parameter options:

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

Available Jupyter and API macros:

  • (Future OS release)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

LED:MMC <enable>
Example:
LED:MMC OFF

C: rp_SetLEDMMCState(bool _enable)

Python:

Turn the Orange LED on or off (responsible for indicating the read memory card).

1.04-18 and up

LED:MMC? > <enable>
Example:
LED:MMC? > ON

C: rp_GetLEDMMCState(bool *_enable)

Python:

Get the state of the MMC indicator.

1.04-18 and up

LED:HB <enable>
Example:
LED:HB OFF

C: rp_SetLEDHeartBeatState(bool _enable)

Python:

Turn the Red LED on or off (responsible for indicating board activity).

1.04-18 and up

LED:HB? > <enable>
Example:
LED:HB? > ON

C: rp_GetLEDMMCState(bool *_enable)

Python:

Get the state of the HeartBeat indicator (Red LED).

1.04-18 and up

LED:ETH <enable>
Example:
LED:ETH OFF

C: rp_SetLEDEthState(bool _enable)

Python:

Turn the LED indicators on the Ethernet connector on or off.

1.04-18 and up

LED:ETH? > <enable>
Example:
LED:ETH? > ON

C: rp_GetLEDMMCState(bool *_enable)

Python:

Ges the state of the Ethernet indicators.

1.04-18 and up

2.3.5.1.15. Temperature protection

Note

These commands are available only on SIGNALlab 250-12

Parameter options:

  • <enable> = {true, false}

Available Jupyter and API macros:

  • Fast analog channels - RP_CH_1, RP_CH_2

STEMlab 125-14 4-Input only (additional):

  • Fast analog channels - RP_CH_3, RP_CH_4

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

-



C: rp_SetEnableTempProtection(rp_channel_t channel, bool enable)

Python: rp_SetEnableTempProtection(<channel>, <enable>)

Enable/disable the DAC overheating protection mode for the specified fast analog
output (SIGNALlab 250-12 only).


1.04-18 and up

-



C: rp_GetEnableTempProtection(rp_channel_t channel, bool *enable)

Python: rp_GetEnableTempProtection(<channel>)

Get the Enable/disable DAC overheating protection mode setting for the specified
fast analog output (SIGNALlab 250-12 only).


1.04-18 and up

-



C: rp_SetLatchTempAlarm(rp_channel_t channel, bool status)

Python: rp_SetLatchTempAlarm(<channel>, <status>)

Reset the flag indicating that the DAC is overheated for the specified fast
analog output (SIGNALlab 250-12 only).


1.04-18 and up

-



C: rp_GetLatchTempAlarm(rp_channel_t channel, bool *status)

Python: rp_GetLatchTempAlarm(<channel>)

Return the flag status indicating that the DAC is overheated for the specified
fast analog output (SIGNALlab 250-12 only).


1.04-18 and up

-



C: rp_GetRuntimeTempAlarm(rp_channel_t channel, bool *status)

Python: rp_GetRuntimeTempAlarm(<channel>)

Returns the current DAC overheat status in real time (SIGNALlab 250-12 only).



1.04-18 and up