Read data from ADEI database `cache0_*` then write them to EPICS CA Server using PCAS and PCASPY

Jalal Mostafa 9a11449eda update adei-metadata extract config file 2 years ago
.gitignore 57d2ea0819 edit .gitignore 3 years ago
README.md 3531889633 archiving request for EPICS archiver and minimal logging 3 years ago
adei-replay.csv 9a11449eda update adei-metadata extract config file 2 years ago
adeireplay.py 9a11449eda update adei-metadata extract config file 2 years ago
archappl-requestbody 3531889633 archiving request for EPICS archiver and minimal logging 3 years ago
requirements.txt 9a11449eda update adei-metadata extract config file 2 years ago

README.md

ADEI Replay

An EPICS server that reads recent data in ADEI archive then outputs the results in PVs for KATRIN.

A table of PV names and corresponding adei item is available in adei-replay.csv

How to setup and run

Required Environment Variables

Env Var Description
ADEI_PASSWORD ADEI password to access ADEI Webservice
ADEI_USER ADEI username to access ADEI Webservice
ADEI_DB_HOST ADEI Target DB
ADEI_DB_USER ADEI Target DB Username
ADEI_DB_PASSWORD ADEI Target DB Password

Container Image

Use the S2I image jalalmostafa/epics-pcas with this source code to launch the server. Expose ports 5064/tcp, 5064/udp and optionally 5065/udp

From EPICS Source

  1. Clone EPICS7
  2. Set EPICS_BASE, EPICS_HOST_ARCH
  3. cd $EPICS_BASE/modules
  4. Clone pcas: git clone https://github.com/epics-modules/pcas.git
  5. Create file $EPICS_BASE/modules/Makefile.local and add the following:

    SUBMODULES += pcas
    pcas_DEPEND_DIRS = libcom
    
  6. cd $EPICS_BASE

  7. make

  8. pip3 install git+git://github.com/paulscherrerinstitute/pcaspy.git

Testing

  1. set EPICS_CA_ADDR_LIST to server IP
  2. Test with camonitor adei:mos-Monitorspeczeus_rep-0-0

Integration with Archiver

12670 is a very big number to use the webapp for. Thus we use the Archiver API directly. POST request to EPICS Archiver Appliance with PV names in the request body

curl -X POST --header 'Accept: application/json' --header 'Content-Type: application/x-www-form-urlencoded' --data '@./archappl-requestbody' http://replay-archappl.kaas.kit.edu/mgmt/bpl/archivePV