How To Set Up for the Event System on an IOC with an EVR(s)
•Assumes you already know what the event system provides and how it works.
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
epics/modules/event//README
configure/RELEASE and xxxApp/src/Makefile ErConfigure and other st.cmd commands Hardware Setup Correcting IDs on PMC EVRs Database, ChannelWatcher, and Archiver Setup Nothing on Display Setup though Nothing on VME EVR vs PMC EVR
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
Modulator Triggers
Hardware Block Diagram 2007 Commissioning
Beam Path Timing Crate F F P E 360Hz A A N Fiducial V 119MHz Clock Acq and BPM FEE Calibration Triggers PADs and PACs Acc and Standby Triggers
Existing Control System
RF Timing
Future MPS
I O N N E G 1 2 T C
E I BPM V O Crates R C
E V LLRF R Crate 1
E V R 2
E I V O R C 3
Beam Rate, Beam Path
Fiber Distribution: Timing Pattern, Timestamp, Event Codes
Trigger
TORO FEE
Triggers
Triggers
F E C I Laser Steering A V A O N R M C Crate
E V ... R 3 1 1 1 8
…
C A M 8
I O C 8
F E I Toro A Farc V O Crate N R C 4
Profile E C C I Monitor V A A O R MM C Crate
E V … R 1 1 2 1 4
…
C A M 7
C A M 8
I O C 4
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
EVG Event Time Line – 4 Fiducials
360Hz Fiducial
F0 (n=0) Time (msec) 0 1.0
HW starts sending R0 event codes, starting with fiducial event code Receive Fn+3 PNET, determine Fn+3 LCLSP0 pattern, and advance pipeline (n-2->n-1->n)
F1 (n=1) 2.8 R1 P1
F2 (n=2) 5.6 R2 P2 L2 E3
F3 (n=3) 8.3 9.3 R3 P3 L3 E4 B0
L0 Set Event Codes in Other RAM based on the E1
Send LCLS pattern last patterns for Fn+1
L1 E2
120Hz BEAM
B-3
Stephanie Allison saa@slac.stanford.edu
Dec 6, 2007 LCLS Controls Software Meeting
Trigger Event Time Line – 1 Beam Pulse (B0)
Record processing (event, interrupt) Hardware Triggers
Triggering Event Codes Event Timestamp, Start pattern records, and BSA ready Fiducial Event Received Receive pattern for 3 pulses ahead Kly Standby Beam Acq Kly Accel Trigger
Fiducial F3 Time (usec) 0 18 0.3 100 500 B0 1023
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
Event System Requirements
Event Generator IOC:
Send out proper event codes at 360Hz based on:
PNET pattern input (beam code and bits that define beam path and other conditions) Add LCLS conditions such as BPM calibration on off-beam pulses , diagnostic pulse etc.
Future – event codes also based on new MPS and user input Send out system timestamp with encoded pulse ID from PNET Send out PNET pattern to be used by SLC-aware IOCs Manage user-defined beam-synchronous acquisition measurement definitions (event definition or EDEF) Check for match between user EDEFs and input PNET pattern at 360Hz and tag matches in outgoing pattern
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
Event System Requirements, cont
Event Receiver IOC:
Set trigger delays, pulse widths, and enable/disable via user requests (not yet done on a pulse-by-pulse basis) Set event code per trigger (triggering done in HW when event code received) Receive event pattern 8.3 msec before corresponding pulse Perform beam-synchronous acquisition based on tags set by EVG in the event pattern Perform beam-synchronous acquisition for the SLCaware IOC based on the PNET part of the event pattern Process pre-defined records when specific event codes are received
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
Each IOC has its own substitutions files using databases/cwConfig files provided by the event module. Each IOC has its own displays for triggered and beamsynchronous devices. Other event-related diagnostics displays provided by the event module and currently accessible from the “Event” tab on lclshome. Databases divided into 4 categories:
EVR Databases Pattern Databases Trigger Database BSA Databases
Databases and Displays
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
EVR Databases One evr record per EVR.
Use evr.db (most apps) from event module. Apps that don’t use the trigger database or don’t save/restore delays, polarities, or pulse widths will use evrWithDelays.db or evrWithExtendedDelays.db from the event module instead. Matching display = tools/edm/display/event/evrDiags.edl Record Reference: http://www.slac.stanford.edu/grp/lcls/controls/glo bal/subsystems/timing/globalEventV3.htm
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
One erevent record per triggering event per EVR:
Use evrEventCtrl.db from event module. Always instantiate :EVENT1 to 14 – you want the spares. See timing block diagram in sharepoint to find mapping between triggered device and TTB/front panel ports. See EVG event display to find event code numbers once you know how devices are to be triggered. One device can be triggered by multiple event codes (ie, BPMs) though not event codes on the same time slot. Enable IRQ if you want records processed on event. Matching display = tools/edm/display/event/evrTriggerDiags.edl Record Reference: http://www.slac.stanford.edu/grp/lcls/controls/global/subs ystems/timing/globalEventV3.htm
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
EVR Databases - cont
Pattern Databases One Pattern Record Group per IOC:
Provides beam/BSA/destination/timeslot information on the current time slot + next 3 timeslots. They also provide generalTime records. All apps (including EVG IOC) should load this one. Use evrPatternAll.db from the event module. Matching displays = tools/edm/display/event/evrPatternDiags.edl and tools/edm/display/event/generalTime.edl
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
Pattern Databases - cont One Pattern Event Record Group per IOC:
Provides event records that will fire if IRQ is enabled on an event code. Also provides delay from the fiducial for each event code (used by the trigger database). Must be loaded with evrPatternAll.db. Use evrEventAll.db from the event module. Matching display = tools/edm/display/event/evrEventDiags.edl
Dec 6, 2007 LCLS Controls Software Meeting
Stephanie Allison saa@slac.stanford.edu
One Trigger Record Group per triggered device:
Provides more user-friendly interface for setting delays, pulse widths, polarities than comes with evr.db. Comes with matching CW configuration. Use evrDevTrig.db, evrDevTrig.cwConfig, and evrIocTrig.cwConfig from the event module. Must be consistent with event codes selected in the EVR databases. See timing block diagram in sharepoint to find mapping between triggered device and TTB/front panel ports: https://slacspace.slac.stanford.edu/sites/LCLS%20Docu ment%20Storage/01%20%20LCLS%20Systems/electronbeamsys/controls/Share d%20Documents/Timing/TIMING%20System%20BD.pdf Matching display = tools/edm/display/event/evr_dev_diags.edl
Dec 6, 2007 LCLS Controls Software Meeting Stephanie Allison saa@slac.stanford.edu
Trigger Database