SR_860
SR_860(uid, visa_resource)
Bases: Instrument
Class for the Stanford Research SR-860 Lock-In Amplifier.
clear()
Clears the status and error registers of the instrument.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
get_advanced_filter()
Queries the advanced filter state.
Returns:
| Name | Type | Description |
|---|---|---|
AdvancedFilter |
AdvancedFilter
|
The current advanced filter state (e.g., OFF, ON). |
get_display_output(parameter)
Queries the display output value for a specific parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter
|
int
|
The parameter index to query (e.g., 0 for X, 1 for Y, 2 for R, 3 for Theta). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The display output value corresponding to the specified parameter. |
get_external_reference_slope()
Queries the slope of the external reference signal.
Returns:
| Name | Type | Description |
|---|---|---|
ReferenceSlope |
ReferenceSlope
|
The slope of the external reference signal (e.g., SINE, TTL_RISING, TTL_FALLING). |
get_filter_slope()
Queries the filter slope setting.
Returns:
| Name | Type | Description |
|---|---|---|
FilterSlope |
FilterSlope
|
The current filter slope setting (e.g., 6 dB, 12 dB). |
get_frequency()
Queries the current reference frequency.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The current reference frequency in Hz. |
get_harmonic()
Queries the current harmonic setting.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The current harmonic setting. |
get_input_configuration()
Queries the input configuration.
Returns:
| Name | Type | Description |
|---|---|---|
InputConfiguration |
InputConfiguration
|
The current input configuration (e.g., A, A-B). |
get_input_coupling()
Queries the input coupling configuration.
Returns:
| Name | Type | Description |
|---|---|---|
InputCoupling |
InputCoupling
|
The current input coupling configuration (e.g., AC, DC). |
get_input_grounding()
Queries the input grounding configuration.
Returns:
| Name | Type | Description |
|---|---|---|
InputGrounding |
InputGrounding
|
The current input grounding configuration (e.g., FLOAT, GROUND). |
get_input_mode()
Queries the input mode.
Returns:
| Name | Type | Description |
|---|---|---|
InputMode |
InputMode
|
The current input mode (e.g., VOLTAGE, CURRENT). |
get_input_voltage_range()
Queries the input voltage range.
Returns:
| Name | Type | Description |
|---|---|---|
InputVoltageRange |
InputVoltageRange
|
The current input voltage range (e.g., 1 V, 300 mV). |
get_internal_frequency()
Queries the internal reference frequency.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The internal reference frequency in Hz. |
get_output(parameter)
Queries the output value for a specific parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter
|
int
|
The parameter index to query (e.g., 0 for X, 1 for Y, 2 for R, 3 for Theta). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The output value corresponding to the specified parameter. |
get_phase()
Queries the current excitation phase in degrees.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The current phase angle in degrees. |
get_r()
Queries the R output value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The R output value. |
get_reference_amplitude()
Queries the reference amplitude.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The reference amplitude in volts. |
get_reference_offset()
Queries the reference offset.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The reference offset in volts. |
get_reference_source()
Queries the current reference source.
Returns:
| Name | Type | Description |
|---|---|---|
ReferenceSource |
ReferenceSource
|
The current reference source (e.g., INTERNAL, EXTERNAL, DUAL, CHOP). |
get_sensitivity()
Queries the sensitivity setting.
Returns:
| Name | Type | Description |
|---|---|---|
Sensitivity |
Sensitivity
|
The current sensitivity setting. |
get_sync_filter()
Queries the synchronization filter state.
Returns:
| Name | Type | Description |
|---|---|---|
SyncFilter |
SyncFilter
|
The current synchronization filter state (e.g., OFF, ON). |
get_theta()
Queries the Theta output value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The Theta output value in degrees. |
get_time_constant()
Queries the time constant setting.
Returns:
| Name | Type | Description |
|---|---|---|
TimeConstant |
TimeConstant
|
The current time constant setting. |
get_x()
Queries the X output value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The X output value. |
get_xy()
Queries both X and Y output values simultaneously.
Returns:
| Type | Description |
|---|---|
list[float]
|
list[float]: A list containing the X and Y output values. |
get_y()
Queries the Y output value.
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The Y output value. |
identify()
Queries the instrument identification string.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The identification string of the instrument. |
reset()
Resets the instrument to its default state.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_advanced_filter(configuration)
Sets the advanced filter state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
AdvancedFilter
|
The advanced filter state to set (e.g., OFF, ON). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_external_reference_slope(slope)
Sets the slope of the external reference signal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slope
|
ReferenceSlope
|
The slope to set (e.g., SINE, TTL_RISING, TTL_FALLING). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_filter_slope(filter_slope)
Sets the filter slope.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filter_slope
|
FilterSlope
|
The filter slope setting to apply (e.g., 6 dB, 12 dB). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_frequency(frequency)
Sets the reference frequency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frequency
|
float
|
The frequency in Hz to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_harmonic(harmonic)
Sets the harmonic.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
harmonic
|
int
|
The harmonic to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_input_configuration(configuration)
Sets the input configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
InputConfiguration
|
The input configuration to set (e.g., A, A-B). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_input_coupling(coupling)
Sets the input coupling configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coupling
|
InputCoupling
|
The input coupling configuration to set (e.g., AC, DC). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_input_grounding(grounding)
Sets the input grounding configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
grounding
|
InputGrounding
|
The input grounding configuration to set (e.g., FLOAT, GROUND). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_input_mode(mode)
Sets the input mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mode
|
InputMode
|
The input mode to set (e.g., VOLTAGE, CURRENT). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_input_voltage_range(input_range)
Sets the input voltage range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_range
|
InputVoltageRange
|
The input voltage range to set (e.g., 1 V, 300 mV). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_internal_frequency(frequency)
Sets the internal reference frequency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frequency
|
float
|
The internal frequency in Hz to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_phase(phase)
Sets the excitation phase in degrees.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
phase
|
float
|
The phase angle in degrees to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_reference_amplitude(amplitude)
Sets the reference amplitude.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
float
|
The amplitude in volts to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_reference_offset(amplitude)
Sets the reference offset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amplitude
|
float
|
The offset in volts to set. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_reference_source(source)
Sets the reference source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
ReferenceSource
|
The reference source to set (e.g., INTERNAL, EXTERNAL, DUAL, CHOP). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_sensitivity(sensitivity)
Sets the sensitivity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sensitivity
|
Sensitivity
|
The sensitivity setting to apply. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_sync_filter(configuration)
Sets the synchronization filter state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
SyncFilter
|
The synchronization filter state to set (e.g., OFF, ON). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |
set_time_constant(time_constant)
Sets the time constant.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_constant
|
TimeConstant
|
The time constant setting to apply. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
Status code indicating the success of the operation. |