SECCTRL-342 #33

Open
lombosi_c wants to merge 6 commits from lombosi_c/gitea-pages:feature/my-changes into master
pull from: lombosi_c/gitea-pages:feature/my-changes
@@ -1,10 +1,98 @@
---
title: Area Detector
tags:
- SLS
- PROSCAN
- SwissFEL
- HIPA
---
# Migration to Area Detector
# Migration to areaDetector
## Background
SwissFEL camera acquisition has historically relied on Windows servers running custom in-house IOCs. Because AIT no longer supports `Windows Server` installations or OS updates, the current platform must be replaced with a supported operating system. At the same time, the existing server fleet is reaching, or already reached end-of-life several years ago, and is being upgraded to latest generation of hardware.
The new target architecture standardizes all camera servers on **Linux and EPICS areaDetector (AD)**. Moving to Linux aligns camera servers with the PSI standard environment, simplifying deployment and maintenance through `shellbox` and standard system services. Adopting areaDetector also gives us access to community-maintained camera drivers, though it requires retiring years of custom in-house Windows IOC development.
## Progress So Far
Development and preparation work for the migration is tracked in [SFELPHOTON-1543](https://psich.atlassian.net/browse/SFELPHOTON-1543).
Evaluation of areaDetector for SwissFEL began in January 2024 with a proof-of-concept test server and Basler cameras. Initial tests started with Pylon Viewer on Linux before moving to `ADPylon` and `ADAravis`. By January 2026, the first test setups were deployed to friendly users at the **Maloja** and **Furka** beamlines to gather operational feedback.
Alongside driver testing, we updated the timing and synchronization setup:
- **Pulse ID Tagging:** Reworked the Pulse ID tagging strategy during PCO camera integration so it covers Basler, PCO, and other scientific cameras consistently.
- **Synchronization:** Updated the infrastructure to support PTP synchronization for GigE cameras where supported. For scientific cameras without PTP, a back-trigger method is used where the camera sends a trigger signal back to be digitized by a Beckhoff module.
## Layout
### Legacy architecture
```mermaid
flowchart LR
subgraph Legacy ["Current Architecture (Per-Server EVR)"]
direction LR
EVT1["EVT"]
EVT2["EVT"]
EVT3["EVT"]
subgraph Rack1 ["Camera Rack"]
direction TB
subgraph CS1 ["Camera Server"]
EVR1["EVR"]
end
subgraph CS2 ["Camera Server"]
EVR2["EVR"]
end
subgraph CS3 ["Camera Server"]
EVR3["EVR"]
end
end
FAN1["<b>EVR fan</b><br/>Output: 16 LEMO / 8 RJ45<br/>Input: 2 LEMO"]
FAN2["<b>EVR fan</b><br/>Output: 16 LEMO / 8 RJ45<br/>Input: 2 LEMO"]
FAN3["<b>EVR fan</b><br/>Output: 16 LEMO / 8 RJ45<br/>Input: 2 LEMO"]
CAMS1["Cameras"]
EVT1 --> EVR1 --> FAN1
EVT2 --> EVR2 --> FAN2
EVT3 --> EVR3 --> FAN3
CS1 <-->|"GigE / CLHS"| CAMS1
FAN1 -->|"Triggers"| CAMS1
end
```
### New architecture
```mermaid
flowchart LR
subgraph Proposed ["Proposed Architecture (Centralized Timing)"]
direction LR
EVT_NEW["EVT"]
subgraph Rack2 ["Camera Rack"]
direction TB
subgraph TS ["Timing Server"]
EVR_NEW["EVR"]
BECKHOFF["BECKHOFF IOC"]
end
CN1["Camera Server"]
CN2["Camera Server"]
CN3["Camera Server"]
end
FAN_NEW["<b>EVR fan</b><br/>Output: 16 LEMO / 8 RJ45<br/>Input: 2 LEMO"]
CAMS2["Cameras"]
EVT_NEW --> EVR_NEW
TS -->|"PID over ZMQ"| CN1
TS -->|"PID over ZMQ"| CN2
TS -->|"PID over ZMQ"| CN3
CN1 <-->|"Data / Control"| CAMS2
FAN_NEW -->|"Triggers"| CAMS2
end
```
## Schedule
The production rollout prioritizes the oldest hardware (**Gen 8** servers) first before moving to newer generations. Rollout progress and individual server migrations are tracked in [SFELPHOTON-1870](https://psich.atlassian.net/browse/SFELPHOTON-1870).
| Server / Beamline | Hardware Gen | Target Date | Jira Ticket |
| :--- | :--- | :--- | :--- |
## Future
Once the core migration is complete, we plan to leverage areaDetector's plugin chain to run image processing locally on the camera IOC nodes. Handling tasks like ROI cropping, binning, or basic statistics directly on the server will reduce unnecessary raw image traffic sent to the `daqsync` servers.