Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Beam Synchronous Acquisition for IOC Engineers Definition/Requirements.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

EPICS Base R and beyond Andrew Johnson Computer Scientist, AES Controls Group.
J. Linnemann, MSU 4/15/ Global L2 Outputs (and inputs) James T. Linnemann Michigan State University NIU Trigger Workshop October 17, 1997.
Stephanie Allison LCLS Event System 14 June LCLS Event System Outline HW Block Diagram Timing Requirements Time Lines EVG.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
LCLS Control System Overview Mike Zelazny SLAC ICD Software Department Accelerator Directorate.
Dayle Kotturi and Stephanie Allison Facility Advisory Committee Meeting April 20-21,
Stephanie Allison/John Dusatko EPICS Collaboration Meeting May 1, Timing and Event System for the LCLS Electron Accelerator*
Stephanie Allison Integration with the SLC Control April 7, 2005 Introduction PNET Receiver VME Module SLC-Aware IOC Existing.
Stephanie Allison Facility Advisory Committee Meeting Apr 16, 2007 Timing and Event System S. Allison, M. Browne, B. Dalesio, J.
Hamid Shoaee High Level Physics 20 April 2006 High Level Physics Applications Update on Plans, New Directions Fairley,
Stephanie Allison LCLS Integration with SLC October 12, 2004 Integration with SLC LCLS Facility Advisory Committee Oct 12, 2004 Introduction.
Diane Fairley High Level October 24-28, 2005 High Level Physics Applications LCLS Week / FAC October 24-28, 2005.
Dayle Kotturi LCLS Diagnostics and Commissioning Workshop September 23, 2004 LCLS Controls and Data Acquisition September 23, 2004.
Stephanie Allison Integration with the SLC Control Oct 27, Introduction Demo SLC-Aware IOC Plans for Next 12 Months.
Dayle Kotturi Facility Advisory Committee Meeting October 12, 2004 Injector/Linac Controls An overview of the status of each of.
Dayle Kotturi SLC April 29, 2004 Outline Motivation Key Components Status Update SLC / EPICS Timing Software Tasks Hardware.
November 12, 2008 Controls Software D. Fairley LCLS Feedback.
Stanford Linear Accelerator Center Next Linear Collider Test Accelerator EPICS Support S. Allison, R. Chestnut, M. Clausen, K. Luchini.
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
EPICS and EDM Overview 03 October 2008 Matt Boyes EPICS and EDM Overview Lecture 1 Matt Boyes.
1 1999/Ph 514: State Notation Language EPICS State Notation Language (SNL) Ned D. Arnold APS.
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
Data Acquisition Data acquisition (DAQ) basics Connecting Signals Simple DAQ application Computer DAQ Device Terminal Block Cable Sensors.
LCLS Timing Software and Plan 1 Controls Timing Workshop EPICS Collaboration Meeting SLAC LCLS Timing Software and Plan April Kukhee Kim.
Dayle Kotturi Lehman Review May 10-12, 2005 LCLS Timing Outline Scope SLC Master Pattern Generator Introducing the PNET VME receiver.
EPICS Collaboration Meeting Fall PAL October 22 ~ 26, 2012 LCLS-I/LCLS-II Timing System Low Level Kukhee Kim for LCLS Timing Team ICD Software,
General Time Update David Thompson Epics Collaboration Meeting June 14, 2006.
K. Luchini LCLS Controls, July 1, 2005 SLAC Aware IOC EPICS Magnet Functional Requirements Introduction Magnet Functions.
3.14 Work List IOC Core Channel Access. Changes to IOC Core Online add/delete of record instances Tool to support online add/delete OS independent layer.
SNS Integrated Control System Timing Clients at SNS DH Thompson Epics Spring 2003.
EPICS Collaboration Meeting Fall PAL October 22 ~ 26, 2012 LCLS Timing System (pattern design, evGUI, and high level) Mike Zelazny for LCLS Timing.
EPICS Collaboration Meeting Timing Workshop April 24, 2012.
EPICS EPICS Limitations Bob Dalesio Marty Kraimer.
LCLS Control Group EPICS Collaboration April 27, 2005 Controls Overview April 27, 2005 Outline Goals Status update.
Fast Fault Finder A Machine Protection Component.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
Stephanie Allison LCLS Controls Software Meeting Dec 6, 2007 How To Set Up for the Event System on an IOC with an EVR(s) Assumes.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
1. LabVIEW and EPICS Workshop EPICS Collaboration Meeting Fall 2011.
Stephanie Allison SLC-Aware April 5, 2005 Introduction Description Issues Progress Plans for 2005 SLC-Aware IOC LCLS Collaboration,
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays Channel access priorities Portable server replacement of rsrv.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
EPICS and LabVIEW Tony Vento, National Instruments
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
Controls Test Stand Test stand proposal document review - Dayle. The activities can be prioritized according to which measurements we need to do first.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Debbie Rogind Diane Fairley SLC-Aware BSAC Facility Requirements Review May 26, 2005 SLC Aware IOC BSAC* Facility Requirements Review *Beam Synchronous.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
LCLS MPS Upgrade Gasper Jansa, Luciano Piccoli, Jeff Olsen, Garth Brown, Sonya Hoobler, Stephen Norum, Stephanie Allison, Kim Kukhee Adding BSA.
ITMT 1371 – Window 7 Configuration 1 ITMT Windows 7 Configuration Chapter 8 – Managing and Monitoring Windows 7 Performance.
1 1999/Ph 514: Lab #2 : IOC Database EPICS Lab #2 IOC Database.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
ESS Timing System Plans Timo Korhonen Chief Engineer, Integrated Control System Division Nov.27, 2014.
JavaIOC Overview and Update
Beam-Synchronous Data Acquisition (BS-DAQ)
SLC-Aware IOC LCLS Collaboration Jan 26, 2005
SLS Timing Master Timo Korhonen, PSI.
LCLS Timing Software and Plan
Timing and Event System S. Allison, M. Browne, B. Dalesio, J
Event Displays for EVR IOCs
LCLS Event System - Software
EPICS Collaboration Meeting
Timing and Event System for the LCLS Electron Accelerator
Channel Access Concepts
Beam Synchronous Acquisition on IOC
Timing and Event System S. Allison, M. Browne, B. Dalesio, J
EVG-to-EVR Data Transfer (Dayle Kotturi)
Breakout Session: Controls
Timing and Event System Status DOE Review of the LCLS Project SC5 - Controls Systems Breakout Session S. Allison, M. Browne, B. Dalesio, J. Dusatko,
Presentation transcript:

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Beam Synchronous Acquisition for IOC Engineers Definition/Requirements Current Implementation (based on SLC BPM Acq) Code - MikeZ, Debbie, Mods/Test - saa Other Ways to Do BSA EVR IOC Setup Steps to Add BSA Functionality Matlab Interface – see Mike Zelazny

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Definition/Requirements 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 Maximum severity which data is considered good Provide constant 1HZ beam-synchronous data for channel archiver and displays (reduce network load without losing synchronicity).

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Current Implementation Three Parts to BSA: User request for an acquisition done by CA client. Data gathering done on the EVG and EVR IOCs When gathering is finished, access of prepared data waiting on IOCs done by CA clients, with checks for a good acquisition. Only the data gathering part is discussed in this talk.

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 IOC Data Gathering Data gathering part consists of the following actions: EDEF (acquisition definition) 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. For 120hz acquisition, data on EVR IOC must be available within 7.3 msec after beam or it will be lost. EDEF will finish with arrays that are not complete if this time budget cannot be met. For an acquisition at full beam rate (ie, 120hz), 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 uses EPICS record processing. EVREVR IOCIOC EVGEVG PNETPNET IOCIOC BPM FEE Triggers Timing Crate BPM Crate Data CA Client EDEF Flags, Pattern, etc EDEF Setup CA Client BSA Data

Data Acquisition Across IOCs … EVR IOC1 Acq #1 … EVR IOC2 Acq #1 … Acq #20 … … … All arrays have 2800 values … … Acq #1 … Acq #20 … EVG IOC Scalar data – X, Y, TMIT, Phase, Amplitude, PMT, Position, Bunch Length Pattern 1 nth element of all arrays for acq #1 is on the same pulse. Scalar 1 … Acq #1 … Acq #20 … Scalar n … Scalar 1 …

EVR Event Time Line – 4 Fiducials/120Hz Beam F2 F1 F Hz Fiducial Time (msec) B0 9.3 F3 8.3 B3 Process Pn-3 pattern, advance pipeline (n-3->n-2->n-1->n), and prepare BSA based on the n records 120Hz BEAM L3 L0 L3 1.0 BPM Records Ready BPM BSA Records Done All B3 BSA MUST be finished before F0 Slower GADCs Ready Slower GADC BSA Done

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Implementation – EVG IOC 360Hz Task The 360hz event task wakes up on interrupt from the PNET module. One of its many duties is to check for a match between the new pulse’s pattern and beam code and each active EDEFs. It keeps a count of the number of measurements and the number of values in the current average per EDEF. Masks are prepared: Pattern match Average done New request (clear history) Bad data severity A detail - pulse information is pipelined - the new pulse is actually for 3 pulses ahead. For the current pulse, for each EDEF that matches, if the average is done, the pattern (5 “modifier” 32bit integers) and pulse ID are stored in arrays for that EDEF that match the arrays provided by the EVR IOCs for scalar data.

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Implementation – EVG-to-EVR 360Hz Data Transfer EDEF bit masks included in 360Hz data sent by EVG to EVR. EVR IOC caches the data on data interrupt. The EVR IOC 360Hz event task is activated on the next fiducial interrupt (event code 1) and it copies the data to the end of the pipeline and then moves up the pipeline. The data are then available to BSA record processing done later in the same pulse.

EVR IOC BSA Record Processing (TORO example) SCAN=IO Intr, PRIO=HIGH TORO EFTMIT ao Record Checks timestamps, averages good values, finds RMS, counts # good values in the average, TORO TMIT ai Record LCLS Time Stamps FLNK TMIT1 bsa Record: Provides data for compress records, resets compress records, updates diagnostics TMIT1HST compress Record VAL, SEVR/STAT, TIME via DOL FLNK VAL, TIME, RES FLNK TMITCNT1HST compress Record TMITRMS1HST compress Record CNT, TIME, RES RMS, TIME, RES Arrays used by BSA CA client: EDEF Masks, Time Stamps 360Hz Data BSA Data scanIoRequest SCAN=IO Intr, PRIO=HIGH TMIT2 to TMITF2 20 sets of records total

Implementation – EVG IOC – Global Event Display

Implementation – EVG IOC – All EDEF Diag Display Put new app name in reserve record – edefReserve sequence will assign next available EDEF number “STEAL 1H” app is using EDEF 10 until freed by the app – “STEAL 1H” can do multiple acqs System EDEFs are reserved and setup at EVG IOC boot and never freed. 15 user-defined requests at one time, is this enough? Issue – apps that crash before freeing.

Implementation – EVG IOC – EDEF Diag Display Beam code describes project, 1 = LCLS (0=any beam code – good for testing) Turn “ON” when ready. EVG IOC 360Hz event task will turn “OFF” when finished. Turn back “ON” to flush and restart the acq. Define # in each average, # measurements, severity at or above which data is not included in average. Forever option used by system EDEFs. Set machine conditions – values acquired only on pulses where ALL inclusion conditions are true AND NO exclusion condition is true Push “Release EDEF” to free this EDEF number. Name and user will be blanked out. Push “Reset Data” to blank out all BSA data arrays.

Implementation – EVG IOC – EDEF Mask Diag Display Choose conditions that define the pulses of interest. Only pulses with these conditions will provide values to the acquisition. The edefMask sequence on the EVG IOC creates the masks used by the 360Hz event task. Condition (bit) names same as the SLC Database (PNBN) and ordered alphabetically in new records by the edefMask sequence.

EVR IOC BSA Record Processing – Event Device Display

EVR IOC BSA Record Proc – Event Device Diag Display

EVR IOC BSA Record Processing – BSA Diag Display Copied from EDEF diag display RMS zero when # avg is 1 Last 100 values of value

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Other Ways to Implement BSA Buffer and stream all data and pattern to big relational database without losses like may happen with channel access. Clients acquire all data from all IOCs using CA with extra logic to watch for missing data when at higher rates (IOC CA server runs at low priority). In both cases, clients do their own pattern checking, timestamp validation, averaging, RMS, etc.

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 EVR IOC Setup to Add BSA Functionality Set up the EVR and pattern databases using steps documented in LCLS Event System:LCLS Event System ng/lclsEventHowTo.ppt README file from the event module. Modify ai record providing data: Add FLNK to BSA ao record (ie, FLNK= :EFTMIT) Set TSE to event code that triggers the acquisition. Currently not needed for 120hz records ( ) but required for rate-limited records (and newer versions of base). Make sure lockset containing ai record is not too big. Use dblsr tool. If SCAN=I/O Intr or Event, set PRIO=HIGH. If SCAN=Passive, make sure any record that links to the ai record is running at high priority. If SCAN=Event, set EVNT to event code that you want to trigger the ai record. Note that all event codes come well before beam.

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 EVR IOC Setup to add BSA Add group of BSA Records per device: Provide a substitutions file (i.e., IOC-IN20- BP01bsa.substitutions) with a line per device. Use one of the following databases from the event module. bsaBPMSEdef.db – BPMs bsaTOROEdef.db – Toroids bsaFARCEdef.db – Faraday Cups bsaBLENEdef.db – Bunch Length Monitors bsaPMTEdef.db – Photo-Multiplier Tubes bsaWIREEdef.db – Wire Scan Positions bsaAMPLEdef.db – LLRF Amplitudes bsaPHASEdef.db – LLRF Phases bsaATTREdef.db – Any device – this file has a lot of macros

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 BSA Diagnostics Display Related display buttons for each EDEF are provided from the per-device event device diagnostics page. Or add these buttons to your own displays somewhere. Each button can use one of the following displays in $EDM/event: evnt_bsa_bpm.edl – BPMs (X,Y,TMIT) evnt_bsa_dev.edl – Toroids and other 1 scalar devices evnt_bsa_llrf.edl – LLRF (Phase and Amplitude) evnt_bsa_ws.edl – Wire Scanners (PMTs and position)

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Testing BSA Test that the ai record is properly timestamped. camonitor :PATTERN.L :PATTERN.C Reserve an EDEF and check the.NUSE of the resultant waveforms. In the lab where hardware and hardware triggers may not be available but there is a functioning EVG and fiber link to your EVR, test BSA with a simulated ai record by setting fields on the ai record: SCAN=Event EVNT= PRIO=HIGH Remember to set the VME IRQ of the event code of interest from the EVR display.

Stephanie Allison LCLS IOC Meeting Jul 18, 2008, Jan 21, 2011 Add BSA to Clients Let High-Level-App group know when the device supports BSA. They can help you test that it’s working. Consider adding the “1H” (1Hz system EDEF) BSA PVs to channel archiver instead of your input PVs which update at a higher rate. All “1H” PVs in the archive will then be synchronous. Consider using the “1H” BSA PVs on higher level EDM displays remembering that these PVs freeze at the last good value when beam goes away. May want to add something to indicate beam-ness or color-code based on the severity of the higher-rate input PV.