Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update sharepoint link
Panel

LCLS Controls Timing

Older Timing Documents Web Page

Sharepoint timing documents

Beam Synchronous Acquisition (BSA)

Using Facility Agnostic Databases

evrmaKernel Driver / evrManager / evrClient modules

SC Timing

SC Timing triggers: User Guide

EPICS EVR HowTo

The information below can also be found in the event module README file at our CVS site

Instructions for EVR users
--------------------------------
These instructions are for EVENT module event-R4-1-0 or later.
The basic steps when configuring a new IOC are in parts I through IV.

Contents:
I - Adding event module support to your IOC application
II - Adding event databases and EVR configuration to your IOC startup file
IIIa - Standard EDM Screens and Their Macros
IIIb - Adding Timing Display autogen to your application
IV - Hardware Setup
V - Special One-Time PMC Setup
VI - Checkout Instructions
 VII - Updating from versions older than event-R3-5-0, for IOC Engineers
VIII - R3-14-12 Migration (migration from pre-event-R3-2-2-br_generaltime branch) issues
IX - Using event module C functions and global variables in your IOC application
X - Consideration for the multiple beam program
XI - Consideration to use the event invariant delay
XII - Consideration for Autosave
XIII - Consideration for the Linux PMC EVR
XIV - General BSA template
XV - Library and DBD files for EVG applicaton
XVI - Library and DBD files for EVR application


If you are still using an older EVENT module please use the README for that specific
module version

...

-----------------------------------------------------

(1) Add EVENT and AUTOSAVE to configure/RELEASE and
clean/rebuild configure.

(2) Link event libraries into your app by adding to xxxApp/src/Makefile:

   xxx_LIBS += evrSupport
   xxx_LIBS += devMrfEr
   xxx_LIBS += mrfVme64x (VME systems only)
   xxx_LIBS += drvMrf (Linux systems only)
   xxx_LIBS += autosave

Note that the order of the above libraries is important.

(3) Add the following .dbd files to xxxApp/src/Makefile
    or to xxxApp/src/xxxInclude.dbd:

   xxx_DBD += evrSupport.dbd
   xxx_DBD += devMrfEr.dbd
   xxx_DBD += autosave.dbd
   
(4) In most cases, you can load these facility-agnostic db files directly in st.cmd.  They have reasonable defaults and standardized names. You can then skip steps 5-8 below.
    To do that, add to xxxApp/Db/Makefile:
    DB_INSTALLS += EvrPmc.db
    DB_INSTALLS += Pattern.db
    DB_INSTALLS += PMC-trig.db (if EVR is PMC type)
    DB_INSTALLS += VME-trig.db (if EVR is VME type)
    DB_INSTALLS += VME-TTB-trig.db (for a rear transition or breakout board)
    DB_INSTALLS += Bsa.db (if BSA will be used)

    Details are here

(5) Add If you aren't using facility-agnostic dbs, add EVR databases to your application.  For an example, see:
    event/<release>/evrIoc/Db/evrXL05.substitutions

(6) Add If you aren't using facility-agnostic dbs, add pattern-related databases to your application.  For an example, see:
    event/<release>/evrIoc/Db/evrPatternXL05.substitutions

(7) For If you aren't using facility-agnostic dbs, for IOCs with triggered devices, add trigger databases to your application.
    For an example, see:
    event/<release>/evrIoc/Db/trigXL05.substitutions. Also add event EDM display
    auto-generation to your trigger database file. See section 'Adding Timing Display
    autogen to your application'.

(8) For If you aren't using facility-agnostic dbs, for IOCs with beam-synchronous acquisition (BSA), add BSA databases to
    your application.  For an example, see:
    event/<release>/evrIoc/Db/bsaXL05.substitutions

(9) For each record that is an input to BSA, add a forward-link (FLNK) to
    record processing that occurs at beam or trigger time:
      field(FLNK, "<dev>:EF<secn>")
    Consult with the HLA group to determine the proper values of <dev> and
    <secn> for your application.

(10) For IOCs with triggered devices, see below section
    'Consideration for Autosave' for instructions on setting up
    autosave of your trigger save/restore setpoints.

(11) For IOCs with triggered devices which use event codes that are generated
    at a "slow" rate (rate slower than beam full rate like a 10Hz event code),
    if records for your devices process or finish processing 8.3 msec beyond
    the time of the trigger (ie, profile monitors), set the TSE field of those
    records to the event code.  The records will then be timestamped at the
    time that the event code was received instead of the time of the last
    fiducial.  The records can then be correlated with other records on other
    IOCs (ie, BPMs) that were acquired on the same pulse.  Make sure that
    the event code IRQ for all possible TSE values is enabled in your EVR
    database.

(12) Add each EVR to the following displays:
    $EDM/event/evnt_<loca>_main.edl
    and one of the following:
    $EDM/event/evnt_all_controllers.edl
    $EDM/event/evnt_all_beamDiag1.edl
    $EDM/event/evnt_all_beamDiag2.edl
    $EDM/event/evnt_all_laser.edl
    $EDM/event/evnt_all_profileMonitor.edl

(13) Add the following PVs to ALH under the "IOC" subgroup
     of the "Event" subgroup for the applicable machine areas:
    For each IOC:
    <iocname>:PATTERNSTATE
    <iocname>:FIDUCIALRATE
    <iocname>:NTPSTATE
    For each EVR:
    <evrname>:LINK
    <evrname>:LINKERR

(14) Add event code sequence PVs to your application by installing the
     event code sequence db file...

Db/Makefile:
DB_INSTALLS += $(EVENT)/db/eventCodeSequenceAll.db

     Doing so provides the following PVs
     $(DEVICE):ECS_$(EVENT_CODE)EV
     $(DEVICE):ECS_$(EVENT_CODE)CNT
     $(DEVICE):ECS_$(EVENT_CODE)RATE
     $(DEVICE):ECS_$(EVENT_CODE)NAME

     for 67 <= $(EVENT_CODE) <= 98

...

------------------------------------------------------
At the top of most of the timing db files you will find an edl file listed that
is associated with that db file. Here are the standard ones, the macros that
should be passed to each, and how to define those macros.

Trigger settings
Db file: *trig.db
EDL file: evnt_trig_*.edl to match hardware (PMC/VME, with/without transition board variations) evnt_trig_PMC_TTB.edl  evnt_trig_PMC_noTTB.edl evnt_trig_VME_TTB.edl  evnt_trig_VME_noTTB.edl
Macros: DEV, LOCA, UNIT, IOC, SYS
Macros are the same ones used with *trig.db. The default value for DEV is
TRIG:$(LOCA):$(UNIT). If the triggers in your EVR don't all have the same prefix
(TRIG:LOCA:UNIT or DEV), you can't use this screen. Copy the appropriate screen
and customize PV names, or use the display autogen approach.

The following will have all macros derived from the trigger screen macros when
launched from trigger screen using the "Experts" button:
evrPatternDiags.edl (Pattern.db)
evrDiags.edl (EvrPmc.db)
evrTriggerDiags.edl (EvrPmc.db)

BSA diagnostics
Db file: Bsa.db
EDL file: evnt_bsa_dev_edefs.edl
Macros:
DEV_BASE - the BSA data source prefix, e.g. BPMS:IN10:371, TRIG:B34:EV05
BSA - the name of the edef specific screen, e.g. evnt_bsa_dev, evnt_bsa_llrf...
The other macros depend on the screen specified as $(BSA). These are for evnt_bsa_dev:
DEV - prefix for the data source, generally $(DEV_BASE):
SECN - part of PV name defined as SECN, ATTR, or ATRB in the bsa db file, e.g. COUNTER
SYS - SYS0 etc.

...

----------------------------------------------------

Please, remove both macros TEC (Trigger Event Code Name) and ACTV (Activate Event Code Invariant Delay)
from your trig.substitution file. (there is no more trigger event code name.
The forward/backward propagation and event code invariant delay is a default mode)

IOC engineer engineers need to put new macro SYS to describe the beam program in the trig.substitution filesubstitutions and evr.substitutions files


Please, follow the following rule.

SYS=SYS0: LCLS
SYS=SYS1: FACET
SYS=SYS2: LCLS II
SYS=SYS6: NLCTA

Note)
If you really want to disable the event code invariant delay,
you can put ACTV macro and set it to ZERO.
Then the feature will be disabled. The intrinsic delay (EVG delay)
will be set to 13004 as a default.
If you want to change the default value, you can use TEC macro.
Please, put your default instrinsic delay value for the TEC macro.

...