BCDA-APS / bdp_controls

APS-U Beam line Data Pipelines - experiment controls with EPICS and Bluesky
Other
0 stars 1 forks source link

EpicsSignal: receives file name PV, sends image via PVAccess #51

Closed prjemian closed 2 years ago

prjemian commented 2 years ago

For Milestone M6, need to involve bluesky in the image process.

Existing code from @sveseli (blueskyImageServer.py) takes a TIFF file name, reads that file, and pushes the image to PVAccess. Let's extend that using an EPICS waveform string (CA) PV to provide the image file name. If the image file exists, then run that existing code in a background thread.

Later on, once ophyd v2 is released, there may be direct support for PVA in ophyd/bluesky. Use this code until then.

prjemian commented 2 years ago

We have a feedback database and soft IOC ready for this. It has a PV:

record(waveform, "$(P)ImageFileName") {
  field(DESC, "image file name, 2k")
  field(DTYP, "Soft Channel")
  field(NELM, "2048")
  field(FTVL, "CHAR")
}

with

DEFAULT_IOC_PREFIX=bdpapi:
prjemian commented 2 years ago

PV with the image file name: bdpapi:ImageFileName

prjemian commented 2 years ago

start the IOC, then

caget -S bdpapi:ImageFileName
prjemian commented 2 years ago

Completed. See https://github.com/BCDA-APS/bdp_controls/blob/main/qserver/instrument/devices/image_file_signal.py