LCLS Event System - Software Software Requirements Event Generation (EVG) Event Receiver (EVR) Beam Synch Acquisition (BSA) EPICS Displays EVG IOC – Diagnostics, Event Code Setup,

Download Report

Transcript LCLS Event System - Software Software Requirements Event Generation (EVG) Event Receiver (EVR) Beam Synch Acquisition (BSA) EPICS Displays EVG IOC – Diagnostics, Event Code Setup,

LCLS Event System - Software
Software Requirements
Event Generation (EVG)
Event Receiver (EVR)
Beam Synch Acquisition (BSA)
EPICS Displays
EVG IOC – Diagnostics, Event Code Setup, BSA Event
Definitions (EDEF)
EVR IOC – Diagnostics, EVR Hardware, Event Code
Diagnostics, Device Trigger Setup
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
Hardware Block Diagram
2007 Commissioning
Modulator
Triggers
Existing
Control
System
RF
Timing
Future
MPS
Beam Path
Acq and BPM FEE
Calibration
Triggers
Timing
Crate
F F P
E
360Hz
A A N
Fiducial V
119MHz
Clock
I
O
N N E
G
1 2 T C
Beam Rate,
Beam Path
E
V
... R
3 1 1 1
8
…
Oct 21, 2008
MCC Operations Meeting
Acc and
Standby
Triggers
E
V
LLRF R
Crate 1
E
V
R
2
E
I
V
O
R
C
3
Fiber Distribution:
Timing Pattern, Timestamp, Event Codes
Trigger
F E C I
Laser
Steering A V A O
N R M C
Crate
E I
BPM V O
Crates R C
PADs and PACs
C
A
M
8
I
O
C
8
TORO FEE
F
E I
Toro
A
Farc
V O
Crate N R C
4
Triggers
Profile E C C I
Monitor V A A O
R MM C
Crate
E
V
… R
1 1 2 1
4
…
Triggers
C
A
M
7
Stephanie Allison
[email protected]
C
A
M
8
I
O
C
4
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.
Near future – event codes also based on new MPS and
user input for kicker control and single-shot
Send out system timestamp with encoded pulse ID from
PNET
Send out PNET pattern to be used by SLC-aware IOCs
Beam-synchronous acquisition management (more later)
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
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 (more later)
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
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
Event Time Line – 120 Hz Beam
360Hz
Fiducial
F0
Time (msec) 0
Beam
Kly Standby
F1
2.8
F2
5.6
B0
S0
BPM Calib
Oct 21, 2008
MCC Operations Meeting
F3
8.3
F4
F5
11.1
13.9
B1
S1
CX0
CY0
CX1
CY1
F6
F7
16.7
19.4
B2
S2
CX2
Stephanie Allison
[email protected]
EVR IOC Time Line – 1 Beam Pulse (B0)
Record processing (event, interrupt)
Hardware Triggers
Event Timestamp,
pattern records,
and BSA ready
Receive pattern for
3 pulses ahead
Triggering
Event Codes
Start End
Kly Accel
Beam
Kly Standby
Acq
Trigger
Fiducial Event
Received
Fiducial
Fiducial
B0
F0
0 ~40
0.3 100 110
~500
…
1023
Time (usec)
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
F1
2778
Event System Requirements, cont
Beam Synchronous Acquisition (BSA):
Acquire all beam-dependent scalars across multiple
IOCs on the same pulse over multiple pulses of a certain
kind (not just x-pulses-in-a-row) up to 120Hz.
Acquire up to 2800 values per scalar in one acquisition
request.
Each value of the 2800 values can be an average of up
to 1000 values.
Each acquisition request can specify:
Beam code (defines project, 1 = LCLS)
Machine conditions of interest – rate, TS, permits, etc
Provide constant 1HZ beam-synchronous data for
channel archiver and displays
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
BSA IOC Data Gathering
CA
Client
BPM FEE
Triggers
Data
P
I
E
E I
BSA Data
N
O
V EDEF Flags, V O
E
G Pattern, etc R C BPM
Timing C
T
EDEF Setup
Crate
CA
Client
Crate
Data gathering part consists of the following actions:
BSA event definition (EDEF) setup and start request done on the EVG IOC.
360hz checking on the EVG IOC with user notification when finished.
360hz requests (acquisition control) sent by the EVG IOC to all EVR IOCs via fast
fiber optic link.
Data checking, averaging, and array update per scalar record per request on the
EVR IOCs.
Data on EVR IOC must be available within 7.3 msec after beam or it will be lost,
even when beam is less than 120hz. EDEF will finish with arrays that are not
complete if this time budget cannot be met.
For an acquisition at full beam rate (ie, 30hz), if data is acquired at a lower rate
(ie, 10hz), the array will not be complete. Use rate-limit bits as-needed when
setting up the EDEF.
Implementation is all EPICS record-based.
Oct 21, 2008
MCC Operations Meeting
Stephanie Allison
[email protected]
EVG IOC – Global Event Display
More to come for kicker control, MPS
interface, and pulse stealing
EVG IOC – Pattern Diagnostics
Common Errors:
MPG_IPLING,
TIMEOUT,
PULSEID_NOSYNC
PVs update at
0.5hz (on
mod720 bit)
For BSA
EVG IOC – Event Codes
EVG IOC – Condition Masks for Event Code 140
For now, masks are
displayed as bit
masks – need name
for each bit!
EVG IOC – All EDEF Diag Display
Put new app name in
reserve record –
edefReserve sequence
will assign next available
EDEF number
15 user-defined
requests at one time,
is this enough?
Issue – apps that
crash before freeing.
“alan” app is using
EDEF 12 until freed
by the app – “alan”
can do multiple acqs
System EDEFs are
reserved and setup
at EVG IOC boot and
never freed.
EVG IOC – EDEF Diag Display
Turn “ON” when ready. EVG IOC 360Hz
event task will turn “OFF” when finished. Turn
back “ON” to flush and restart the acq.
Set machine conditions –
values acquired only on
pulses where ALL inclusion
conditions are true AND NO
exclusion condition is true
Beam code describes project, 1 = LCLS
(0=any beam code – good for testing)
Define # in each average, #
measurements, severity at or above which
data is not included in average. Forever
option used by system EDEFs.
Push “FREE” to free this EDEF number. Name
and user will be blanked out.
EVG IOC – EDEF Mask Diag Display
Condition (bit) names come
from the SLC Database
(PNBN) and ordered
alphabetically in new records
by the edefMask sequence.
Choose conditions that define the pulses of interest. Only pulses with
these conditions will provide values to the acquisition.
EVR IOC – Sector Event Display
Common Errors:
MPG_IPLING and
TIMEOUT…
PVs update at
0.5hz (on
mod720 bit)
Pattern Pipeline
(but no TS 4!)
For BSA
Missing Pattern
Interrupt
Missing Pattern
Interrupt
Extra
Interrupts
Fiducial
Processing
Too Long
EVR IOC – General Time Diagnostics Display
epicsTimeGetCurrent
epicsTimeGetEvent
(Record Timestamps)
evrTimeGet – OK
evrTimeGetSystem – Event System problem (pulse ID set to invalid)
General Time will transition between different time providers without
going backward in time
EVR IOC – EVR Hardware
Transition module
uses 14 regular
triggers
Front panel uses
extended delay triggers
(only 3 for PMC EVR)
Fiber connection status (from EVR fanout module), polled at 0.5hz
All BPM EVRs – first 7 channels for data, last 7 channels for calibration:
Data acquired at 360hz (event code 20 on TS 2,5; event code 30 on TS 3,6;
event code 40 on TS 1,4) where only TS 4 will produce X/Y/TMIT record
updates if the pulse has beam. Calibration on TS 2,3,5,6 only.
See event display for event code description
Enabled so that beam rate is calculated
Note: Enabling IRQ causes interrupts/task switches at the rate of the event
code receipt (…watch CPU performance after enabling)
EVR IOC – Event Code Diagnostic Display
Delay from fiducial
Event code
description
Standby (base
rate) beamindependent
events
MJB requests all
standby event
codes be
replaced by 36
event codes
using the same
delay (like SLC)
Rate calculated only if IRQ is enabled (fiducial IRQ
automatically enabled on all IOCs)
EVR IOC – Device Trigger Setup Display
EVR IOC – Device Trigger Diagnostic Display
EVR IOC – Device BSA Diagnostic Display
Copied from
EDEF diag
display
Last averaged
values
RMS zero when
# avg is 1
Various
inputs/outputs
to averaging
sSub record
Last 100 values
of value