Speaker
Description
Beamline Experiment Control (BEC) is the experiment control layer for the Swiss Light Source (SLS) following its upgrade to a fourth-generation synchrotron. It has a service-oriented client–server architecture where services communicate via Redis, acting as message broker and in-memory database. On the hardware side, BEC relies on the Bluesky’s ophyd v1 library as its abstraction layer.
This contribution presents how devices are managed in a centralized service: the device server, PSI’s implementation of ophyd-as-a-service. Beamlines configure device sessions for upcoming experiments using descriptive YAML files, which are used to instantiate ophyd objects. Devices are exposed to other services, including user clients, through BEC’s event system in Redis, providing access to device signals as well as the Bluesky interface (read/trigger/stage/unstage). Using simple examples, we illustrate how step and fly scans can be implemented at the SLS with standard EPICS and custom hardware. We further detail the data flow during a scan, highlighting how other services such as the GUI and file writer can visualize data in real time or start writing during acquisition.
In addition, we present PSI’s toolbox developed around ophyd v1 that enables devices in BEC to act or react autonomously to specific events. While scans are implemented slightly different in BEC, the core concept of Bluesky plans, scans as lists of instructions, remains. We also demonstrate extensions to the BlueskyInterface that reduce integration time at the beamline, such as custom file-event signals, progress updates, and preview data from large-area detectors using a custom data backend. Together, these developments streamline experiment setup, improve flexibility, and enhance user experience at the upgraded SLS.