You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Options

(Aug. 2, 2021 brainstorming with Alberto, Bruce, Silke, Valerio, Matt, Dan D., Chris)

Given the known difficulties with realtime epics gateway behavior we discussed more sustainable longterm solutions for realtime acr feedback from photon side.  We thought these 3 options might be feasible:

(1) use daq software (similar to what Dan wrote) to fill a BSA buffer readable by ACR matlab.  Likely have network security issues writing from the photon side to a BSA buffer that Alberto can read
(2) run ACR matlab on photon side and get all ACR data (smaller) that they need into the DAQ (likely via BLD).  cpo will work with IT to get matlab running there.  alberto should check with greg white if matlab can use PVA structures.  alberto should also identify what other timestamped data needs to be sent to photon side via BLD (non-trivial lead-time)
(3) change network security to allow epics connections through network routers

We also considered a direct network connection to the DRP subnet (perhaps like the soft/hard XTCAV) but Alberto felt that would constrain too much where their software could run.

The thinking was that (2) is likely most feasible and conceptually most future proof, since large data in the future will likely be on the photon side so we will try that (i.e. move the software to the data).  ACR should consider using psana-python in the future, but they will need additional tools developed for that (algorithms and a "playback buffer" that they can analyze in different ways).

Router Network Support

This Jira ticket shows the network changes that were implemented: https://slacprod.servicenowservices.com/now/nav/ui/classic/params/target/incident.do%3Fsys_id%3Dfe3008a31b2135901c3262cfe54bcbaf%26sysparm_stack%3Dincident_list.do%3Fsysparm_query%3Dactive%3Dtrue

After those changes this approach worked for CA EPICS (courtesy of Jesse Bellister):

Try with either appending the port 5064 to the ADDR_LIST or setting the EPICS_CA_SERVER_PORT to 5064, it's set to a non-standard port (5068) by default on lcls-srv01:
 
[softegr@lcls-srv01 ~]$ EPICS_CA_ADDR_LIST=172.21.152.78:5064 EPICS_CA_AUTO_ADDR_LIST=NO cainfo TMO:ACR:WAVEFORM
TMO:ACR:WAVEFORM
State: connected
Host: 172.21.152.78:5064
Access: read, no write
Native data type: DBF_FLOAT
Request type: DBR_FLOAT
Element count: 1026
 
[softegr@lcls-srv01 ~]$ EPICS_CA_ADDR_LIST=172.21.152.78 EPICS_CA_SERVER_PORT=5064 EPICS_CA_AUTO_ADDR_LIST=NO cainfo TMO:ACR:WAVEFORM
TMO:ACR:WAVEFORM
State: connected
Host: 172.21.152.78:5064
Access: read, no write
Native data type: DBF_FLOAT
Request type: DBR_FLOAT
Element count: 1026


Shared Memory to Channel Access via Direct Network Connection

The Piranha images can be received from DAQ shared memory and pushed to channel access.  ACR can read this PV from the shared memory node.

Instructions:

  1.  The TMO DAQ must run another shared memory server ("meb2") and the python script that pulls the Piranha image and pushes to EPICS.  This is done with the following lines in tmo.cnf.

    acr_shmem_node = "drp-srcf-cmp035"
    ...
    #
    #  Try a separate shmem node
    #
    { host:acr_shmem_node, id:'meb2',         flags:'spu',                cmd:f'{meb_cmd} -t {hutch}_meb2 -d -n 16 -q 1'},
    { host:acr_shmem_node, id:f'acr_server',  flags:'s', cmd:f'python ~tmoopr/daq/tmo_acr_piranha_feedback.py -P TMO:ACR -R 5 -D tmo_fzppiranha'},
    ]

    The tmo_acr_piranha_feedback.py python script is the code that does the work here.  The -P option specifies the PV name (TMO:ACR:WAVEFORM, in this example).  The -D option specifies the detector name (without any _0 suffix).  The -R option specifies the rate limit in Hz, or a -E option can be used to specify an event code for selecting events.  ACR BSA is likely acquired with an event code like 29(10Hz) or 30(100Hz), so " -E 30".  See Control Sequence Bit for event code choices.

  2.  From lcls-srv01, the channel access PV can be read by adding the drp-srcf-cmp035 address to the EPICS_CA_ADDR_LIST environment variable:
    [softegr@lcls-srv01 ~ ]$ EPICS_CA_ADDR_LIST+=\ 172.21.152.56:5064
    [softegr@lcls-srv01 ~ ]$ camonitor -# 10 TMO:ACR:WAVEFORM
    TMO:ACR:WAVEFORM               *** Not connected (PV not found)
    TMO:ACR:WAVEFORM 2024-05-29 15:44:10.432878 10 21 14 14 15 21 15 17 15 21 15
    TMO:ACR:WAVEFORM 2024-05-29 15:44:53.380389 10 18 13 6 19 16 13 9 12 18 15  
  • No labels