EL734 motion controller

This repository contains the driver code and "default" Midas frontend for the EL734 motion controller (developed in-house at PSI).

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 <directory-to-build-in>
cmake --build <directory-to-build-in> --clean-first -- -j8

Including in a larger CMake Project

This repository builds three library targets:

  • el734 - old command set / firmware version
  • el734new - new command set / firmware version
  • el734_12MOT - new command set with up to 12 axes

Default Frontend

To use the default frontend contained within the frontend directory from within a larger CMake project, you should ensure that the environment variable MIDASSYS points to your system install and include a snippet in your CMakeLists.txt similar to the following:

# If the path to the el734 repository is outside of the frontend repository,
# you also need to provide a location for the el734 artifacts as a second
# argument to `add_subdirectory`
# e.g. `./device/el734`
add_subdirectory(
    <path-to-el734-repository>
)

default_el734_frontend(
  Sample_angle_scfe            # Target Name
  Sample_angle                 # Frontend Name
  7                            # Event ID
  2                            # Number of motor axes
  el734|el734new|el734_12MOT   # Library target
)

Custom Frontend

To use this driver within a custom frontend, ensure the environment variable MIDASSYS points to your system install. Then include this repository within the parent CMakeLists.txt and build your target against one of the exposed libraries:

# If the path to the el734 repository is outside of the frontend repository,
# you also need to provide a location for the el734 artifacts as a second
# argument to `add_subdirectory`
# e.g. `./device/el734`
add_subdirectory(
    <path-to-el734-repository>
)

add_executable(
  <custom-frontend-target-name>
  :
  :
)

target_link_libraries(
  <custom-frontend-target-name>
  PRIVATE
    el734|el734new|el734_12MOT   # Chosen Library target built by this repo
    :
)

Test Frontend

Clone this repository, enter the cloned directory, and then build via CMake ensuring that the BUILD_TEST_FRONTEND variable is defined.

cmake -S "$(pwd)" -B <directory-to-build-in> -DBUILD_TEST_FRONTEND=ON
cmake --build <directory-to-build-in> --clean-first -- -j8

This will create an executable within the directory <directory-to-build-in>/el734_scfe which you can run via

<directory-to-build-in>/el734_scfe -e <instrument-name>

The test frontend is built agains the el734 library target.

S
Description
Driver for the EL734 motion controller. Only compatible to BulkMuSR, because a lot of information like e.g. limits are hardcoded.
Readme
172 KiB
0 Stars 0 Watchers 0 Forks
Languages
C++ 94.6%
C 4.1%
CMake 1.3%