Stanford Research Systems SR830 DSP Lock-In Amplifier
This repository contains the driver code and Midas frontend for Stanford Research Systems SR830 DSP Lock-In Amplifier.
Optional LAN / GPIB support can be enabled via the compilation flag
GPIB_SUPPORT, more on that below.
Requirements
Requires a Midas installation with the environment variable MIDASSYS pointing
to the built Midas artifacts and headers.
Build
Clone this repository, enter the cloned directory, and then build via CMake.
cmake -S "$(pwd)" -B <build-directory> -DBUILD_FRONTENDS=ON
cmake --build <build-directory> --clean-first -- -j8
Run
# Uses no flag
<build-directory>/srs_sr830_fe -e flame
# Uses flag GPIB_SUPPORT
<build-directory>/srs_sr830_gpib_fe -e flame
Including in Custom Frontend
To include this driver in a custom frontend, you should ensure the environment
variable MIDASSYS points to your system install. The compilation flag
GPIB_SUPPORT can be enabled by including the flag in
target_compile_definitions and linking to the corresponding support target
srs_sr830_gpib, as shown below. Remove these parts if LAN / GPIB support is not
needed.
TODO:
# If the path to the srs_sr830 repository is outside of the frontend
# repository, you also need to provide a location for the srs_sr830
# artifacts as a second argument to `add_subdirectory`
# e.g. `./device/srs_sr830`
add_subdirectory(
<path-to-srs_sr830-repository>
)
add_executable(
<frontend-name>
<frontend-code-path-1>
<frontend-code-path-2>
:
)
# Remove this line if LAN / GPIB support is not needed
target_compile_definitions(<frontend-name> PRIVATE GPIB_SUPPORT)
set_property(
TARGET
<frontend-name>
PROPERTY
CXX_STANDARD 11
)
target_include_directories(
<frontend-name>
PRIVATE
$ENV{MIDASSYS}/drivers
$ENV{MIDASSYS}/include
)
target_link_libraries(
<frontend-name>
srs_sr830
srs_sr830_gpib # Support target for FLOW_SUPPORT flag
<additional-library-1>
<additional-library-2>
:
)