...
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
...