13
Stephanie Allison LCLS Controls Software Meeting [email protected] Dec 6, 2007 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.

Stephanie Allison LCLS Controls Software Meeting [email protected] Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Embed Size (px)

Citation preview

Page 1: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

How To Set Up for the EventSystem on an IOC with an EVR(s)

•Assumes you already know what the event system provides and how it works.

Page 2: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

epics/modules/event/<version>/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

Page 3: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Beam PathExistingControlSystem

119MHzClock

EVR

Hardware Block Diagram 2007 Commissioning

IOC

EVG

PNET

Fiber Distribution:Timing Pattern, Timestamp, Event Codes

EVR1

Acc andStandbyTriggers360Hz

Fiducial

Beam Rate, Beam Path

FutureMPS

RFTiming

ModulatorTriggers

PADs and PACs

FAN1

FAN2

FAN3

EVR1

...

IOC1

CAM1

EVR8

IOC8

CAM8

Trigger

LaserSteeringCrate

FAN4

EVR1

IOC1

CAM1

EVR4

IOC4

CAM7

ProfileMonitorCrate

CAM2

CAM8

… …

Triggers Triggers

IOC

BPM FEEAcq and CalibrationTriggers

BPMCrates

Timing Crate

LLRFCrate

EVR2

IOC

EVR3

EVR

IOC

TORO FEE

ToroFarcCrate

Page 4: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

EVG Event Time Line – 4 Fiducials

F1 (n=1) F2 (n=2) F3 (n=3)

0 2.8 5.6

360Hz Fiducial

Time (msec)

B0

P0 P1 P2Receive Fn+3 PNET,

determine Fn+3 LCLS pattern, and advance pipeline (n-2->n-1->n)

HW starts sending event codes, starting

with fiducial event code

R1

9.3

R0 R2

E1 E2Set Event Codes in Other RAM based on the

last patterns for Fn+1

E3

F0 (n=0)

8.3R3

P3

E4

B-3120Hz BEAM

1.0

L0 L1 L3Send LCLS pattern L2

Page 5: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Trigger Event Time Line – 1 Beam Pulse (B0)

F3

0

Fiducial

Time (usec)

B0

Acq Trigger

1023

BeamKly Standby

Record processing (event, interrupt)

Fiducial Event Received

Event Timestamp, pattern records, and BSA ready

Receive pattern for 3 pulses ahead

Hardware Triggers

5000.3

18100

Triggering Event Codes

StartKly Accel

Page 6: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Event System RequirementsEvent 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 inputSend out system timestamp with encoded pulse ID from PNETSend out PNET pattern to be used by SLC-aware IOCsManage 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

Page 7: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Event System Requirements, contEvent 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 pulsePerform beam-synchronous acquisition based on tags set by EVG in the event patternPerform beam-synchronous acquisition for the SLC-aware IOC based on the PNET part of the event patternProcess pre-defined records when specific event codes are received

Page 8: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Databases and DisplaysEach IOC has its own substitutions files using databases/cwConfig files provided by the event module.

Each IOC has its own displays for triggered and beam-synchronous 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

Page 9: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

EVR DatabasesOne 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/global/subsystems/timing/globalEventV3.htm

Page 10: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

EVR Databases - contOne erevent record per triggering event per EVR:

Use evrEventCtrl.db from event module.Always instantiate <evr>: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.edlRecord Reference: http://www.slac.stanford.edu/grp/lcls/controls/global/subsystems/timing/globalEventV3.htm

Page 11: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Pattern DatabasesOne 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

Page 12: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Pattern Databases - contOne 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

Page 13: Stephanie Allison LCLS Controls Software Meeting saa@slac.stanford.edu Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes

Stephanie Allison LCLS Controls Software Meeting [email protected] 6, 2007

Trigger DatabaseOne 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%20Document%20Storage/01%20-%20LCLS%20Systems/electronbeamsys/controls/Shared%20Documents/Timing/TIMING%20System%20BD.pdfMatching display = tools/edm/display/event/evr_dev_diags.edl