LCR mode

Functionality overview

LCR mode commands enable impedance measurements using Red Pitaya as an LCR meter. These commands support measurement of inductance (L), capacitance (C), and resistance (R) in both series and parallel configurations, with optional external LCR extension module support.

Important notes

  • Requires appropriate signal amplitude and frequency for accurate measurements.

  • External LCR extension module provides improved measurement range and accuracy.

  • Shunt resistor selection affects measurement sensitivity.

Code examples

[To be added - examples specific to LCR measurements]

Parameters and command table

Parameter options:

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

  • <mode> = {SERIES, PARALLEL} Default: SERIES

  • <ext_mode> = {LCR_EXT, CUSTOM} Default: LCR_EXT

  • <ext_module_shunt> = {S10, S100, S1k, S10k, S100k, S1M} Default: S10

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

  • <amplitude> = {-1 ... 1} (in Volts). Default: 0.5

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

  • <shunt> = {1 ... 100000000} (in Hertz). Default: 100

  • <json> Result of measure in JSON format

Available Jupyter and API macros:

  • (Future OS release)

SCPI

API, Jupyter

DESCRIPTION

ECOSYSTEM

LCR:START
Example:
LCR:START

C++: lcrApp_LcrRun()

Python:

Starts the LCR processing thread and resets settings to default.
Settings for the generator need to be made after starting the thread.

2.05-37 and up

LCR:START:GEN
Example:
LCR:START:GEN

C++: lcrApp_LcrReset()

Python:

Starts the generator on out 1 with the specified settings.

2.05-37 and up

LCR:STOP
Example:
LCR:STOP

C++: lcrApp_LcrStop()

Python:

Stops the LCR thread.

2.05-37 and up

LCR:RESET
Example:
LCR:RESET

C++: lcrApp_LcrReset()

Python:

Resets default settings in LCR api.

2.05-37 and up

LCR:MEASURE? > <json>
Example:
LCR:MEASURE? > {...}

C++: lcrApp_LcrCopyParams(lcr_main_data_t *data)

Python:

Returns calculations of the last processed data wrapped in json format.

2.05-37 and up

LCR:FREQ <frequency>
Example:
LCR:FREQ 1000

C++: lcrApp_LcrSetFrequency(float frequency)

Python:

Sets the frequency for the generator.
To apply all the settings you need to call the command that starts the generator.

2.05-37 and up

LCR:FREQ? > <frequency>
Example:
LCR:FREQ? > 1000

C++: lcrApp_LcrGetFrequency(float *frequency)

Python:

Returns the current frequency setting of the generator.

2.05-37 and up

LCR:VOLT <amplitude>
Example:
LCR:VOLT 1000


C++: lcrApp_LcrSetAmplitude(float volt)

Python:


Sets the amplitude for the generator. The default value is 0.5V.
You can set any value up to 1V. But you need to take into account that when
working with LCR, the position of the jumpers should be in the Hi-Z position.
Therefore, amplitude values greater than 0.5 will not be
correct for most measurements.

2.05-37 and up

LCR:VOLT? > <amplitude>
Example:
LCR:VOLT? > 1000

C++: lcrApp_LcrGetAmplitude(float *volt)

Python:

Returns the current amplitude setting.

2.05-37 and up

LCR:VOLT:OFFS <offset>
Example:
LCR:VOLT:OFFS 0

C++: lcrApp_LcrSetOffset(float offset)

Python:

Sets the signal offset of the generator.

2.05-37 and up

LCR:VOLT:OFFS? > <offset>
Example:
LCR:VOLT:OFFS? > 0

C++: lcrApp_LcrGetOffset(float *offset)

Python:

Returns the signal offset of the generator.

2.05-37 and up

LCR:SHUNT <ext_module_shunt>
Example:
LCR:SHUNT S10

C++: lcrApp_LcrSetShunt(lcr_shunt_t shunt)

Python:

Sets the shunt on the expansion board for the LCR.

2.05-37 and up

LCR:SHUNT? > <ext_module_shunt>
Example:
LCR:SHUNT? > S10

C++: lcrApp_LcrGetShunt(lcr_shunt_t *shunt)

Python:

Returns the current shunt value. Even in AUTO shunt mode.

2.05-37 and up

LCR:SHUNT:CUSTOM <shunt>
Example:
LCR:SHUNT:CUSTOM 10

C++: lcrApp_LcrSetCustomShunt(int shunt)

Python:

Sets the shunt value when the expansion card is not in use.

2.05-37 and up

LCR:SHUNT:CUSTOM? > <shunt>
Example:
LCR:SHUNT:CUSTOM? > 10

C++: lcrApp_LcrGetCustomShunt(int *shunt)

Python:

Sets the shunt value when the expansion card is not in use.

2.05-37 and up

LCR:SHUNT:MODE <ext_mode>
Example:
LCR:SHUNT:MODE LCR_EXT

C++: lcrApp_LcrSetShuntMode(lcr_shunt_mode_t shunt_mode)

Python:

Sets the usage mode. With and without expansion board.
Must be set before starting the LCR.

2.05-37 and up

LCR:SHUNT:MODE? > <ext_mode>
Example:
LCR:SHUNT:MODE? > LCR_EXT

C++: lcrApp_LcrGetShuntMode(lcr_shunt_mode_t *shunt_mode)

Python:

Returns the current shunt operation mode.

2.05-37 and up

LCR:SHUNT:AUTO <enable>
Example:
LCR:SHUNT:AUTO OFF

C++: lcrApp_LcrSetShuntIsAuto(bool isShuntAuto)

Python:

Enables or disables the automatic shunt selection mode for the expansion board.

2.05-37 and up

LCR:CIRCUIT <mode>
Example:
LCR:CIRCUIT SERIES

C++: lcrApp_LcrSetMeasSeries(bool series)

Python:

Sets the measuring mode to serial or parallel. Affects the parameters: L, C, R.

2.05-37 and up

LCR:CIRCUIT? > <mode>
Example:
LCR:CIRCUIT? > SERIES

C++: lcrApp_LcrGetMeasSeries(bool *series)

Python:

Returns the measurement mode.

2.05-37 and up

LCR:EXT:MODULE? > <enable>
Example:
LCR:EXT:MODULE? > ON

C++: lcrApp_LcrIsModuleConnected(bool *state)

Python:

Returns the status of the expansion board.
If the value is ON, the board is connected.

2.05-37 and up