EPICS: Allow reading partial waveforms (first N elements)#1253
EPICS: Allow reading partial waveforms (first N elements)#1253PierreSchnizer wants to merge 2 commits into
Conversation
…ector WARNING: work in progress
|
I like the concept, but we need to make sure both CA and PVA can do this.
Would you be able to try this out for PVA as well please? |
|
Yes I will try to get it running with P4P |
|
Sorry I was detoured by other tasks. |
Large EPICS waveforms (array-valued signals) are currently always transferred in full, even when only a small subset of the data is needed.
For high-rate acquisitions, data is buffered continuously but read out on trigger. In typical use, users select only a small portion of that buffer. Transferring the full array in these cases creates unnecessary network load and does not scale well.
This has a measurable impact in practice: at BESSY II, reading out all ~120 BPMs doubles measurement time due to the volume of data transferred. As a workaround, users are forced to limit the number of devices instead of using all available data sources.
This PR adds support for reading only the first N elements of a waveform (i.e. partial reads of array/spectrum data). It uses the EPICS Channel Access n_elements feature and exposes it via epics_options when defining a signal.
The implementation is currently EPICS-specific.
Discussion: This PR is intended as a starting point to explore partial reads of array-valued signals across backends.
Discussion link: #1254
An initial implementation to support discussion is provided here to make the idea concrete and easier to evaluate.
As an example use case, beam position monitors (e.g. Libera Spark, Brilliance) produce turn-by-turn data at ~1 µs intervals and store it in buffers of up to 65k samples. In many applications, only the first few samples are required, making full data transfer unnecessary.