1 / 37

EPICS Experience at Fermilab

EPICS Experience at Fermilab. Geoff Savage August 2005 Controls and Monitoring Group. Outline. Fermilab and D Ø What is EPICS? EPICS at D Ø - RunIIa EPICS at D Ø – RunIIb EPICS and the CFT EPICS at Fermilab EPICS lessons. Chicago . p. p. 1.96 TeV. Booster. p. CDF. DØ.

Télécharger la présentation

EPICS Experience at Fermilab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EPICS Experience at Fermilab Geoff Savage August 2005 Controls and Monitoring Group

  2. Outline • Fermilab and DØ • What is EPICS? • EPICS at DØ - RunIIa • EPICS at DØ – RunIIb • EPICS and the CFT • EPICS at Fermilab • EPICS lessons MICE DAQ and Controls Workshop

  3. Chicago  p p 1.96 TeV Booster p CDF DØ Tevatron p p source Main Injector & Recycler Fermilab MICE DAQ and Controls Workshop

  4. DØ Detector Forward Muon Layer C Liquid Argon/Uranium Calorimeter Superconducting Solenoid Scintillating Fibers Central Muon Layer A Silicon Tracker Central Muon Layer B Central Muon Layer C Muon Toroid MICE DAQ and Controls Workshop

  5. What is EPICS? • Experimental Physics and Industrial Control System • Collaboration • Control System Architecture • Software Toolkit • Integrated set of software building blocks for implementing a distributed control system • www.aps.anl.gov/epics MICE DAQ and Controls Workshop

  6. Why EPICS? • Availability of device interfaces that match or are similar to our hardware • Ease with which the system can be extended to include our experiment-specific devices • Existence of a large and enthusiastic user community that understands our problems and are willing to offer advice and guidance. MICE DAQ and Controls Workshop

  7. EPICS Architecture OPI – a workstation running EPICS tools. Operating Systems: Linux and Windows XP. Operator Interface (OPI) LAN – communication path for Channel Access (CA), the EPICS communication protocol. Local Area Network (LAN) Input Output Controller (IOC) IOC – platform supporting EPICS run-time database. Example: VME based PPC processor running vxWorks, Linux workstation. MICE DAQ and Controls Workshop

  8. IOC Architecture MICE DAQ and Controls Workshop

  9. IOC Database • Collection of records • Each record represents a system parameter (process variable, PV) • Unique name • Set of attributes • Attributes and value can be modified • Records must process to do something • An input record can read a value every 10 seconds • A CA write to an output record causes the record to process • Either input or output, not both MICE DAQ and Controls Workshop

  10. EPICS Records • Input • Analog In (AI) • Binary In (BI) • String In (SI) • Algorithm/control • Calculation (CALC) • Subroutine (SUB) • Output • Analog Out (AO) • Binary Out (BO) • Custom – only needed when existing record types or a collection of existing record types are inadequate MICE DAQ and Controls Workshop

  11. Channel Access EPICS Tool (CA Client) • One client can connect to many servers. • A channel connects to the value or an attribute of a PV. • Each channel has a unique name = record name + attribute. • CA Services: • Search – find a channel by name • Get – retrieve a channel value • Put – modify a channel value • Add monitor – notification of state change LAN IOC (CA Server) MICE DAQ and Controls Workshop

  12. EPICS at DØ - RunIIa • Support for new devices and additional field busses • Centralized database with supporting tools for defining the control system configuration • Report EPICS alarms to our global event reporting system • Interface to the Python programming language used to develop host tools for downloading and monitoring • Detector configuration management - COMICS • Archiving • Gateways MICE DAQ and Controls Workshop

  13. MIL-STD-1553B Bus • Restricted detector access while running • Provides a robust and highly reliable connection to electronics in the remote collision hall • Developed a queuing driver, device support, and a generic record • 12 IOCs with ~70 1553 busses from the counting house to the detector and ~10 busses within the counting house MICE DAQ and Controls Workshop

  14. DØ Specific Records • SVX sequencer - configures and controls the ADCs in the tracking detectors • High voltage • Implemented using a state machine model • Linear ramping with retries • Trip condition recovery • Limits control • Rack monitor - Generic I/O module • 64 A/D inputs, 4 D/A output, 4 16-bit I/O words • MIL-1553 – debugging/testing on a 1553 bus MICE DAQ and Controls Workshop

  15. DØ Specific Device Support • Access hardware registers across the MIL-1553 bus and VME backplane using standard EPICS records – long input, long output, … • Support for DZERO specific records • Bira 4877 power supplies • SVX sequencers • Rack monitor • Complex MIL-1553 bus transactions • Dual port memory on the AFE boards • Write the address to access followed by a read or write of the data MICE DAQ and Controls Workshop

  16. Describe a Device with Records Template File Multiple record definitions with substitution parameters This defines a device. Instances of records read by IOC to create record database. ASCII file EPICS tool EPICS Database Database Load Generator File Define instances of a template. Assign values to the substitution parameters in the template file. MICE DAQ and Controls Workshop

  17. Template File Generator File EPICS Database Instance Creation DB Creation Oracle Hardware Database Python Scripts Web Access Record Extract Template Extract EPICS Database Generator File IOC Id Centralized Database System MICE DAQ and Controls Workshop

  18. PV Naming Convention • <det>[subdet]_<devtype>_<loc>/<attr>[:io][.field] • <det>  - Required detector system • CTL, SMT, CFT, CPS, CAL, FPS, ICD, MUO • [subdet] - Optional subdetector • North, South, East, West, Forward, Test • <devtype> - Required Device Type • ADC, BLS, HV, PLS, CETEC, ... • <loc>  - Required Location indicator • For example a crate number: M201, PC03, F313 • <attr> - Required device attribute • PEDS, MODE, SFM, CTEC, HEAD, VER, ... • [:io] - Optional Input/Output designation         Direction is from the viewpoint of the front end crate • [.field] - Optional Epics field name, default is .VAL • Example: CTL_LV_M201/P5V MICE DAQ and Controls Workshop

  19. Global Event Reporting • Collect and distribute significant events from detector and DAQ • Run control • Alarms - data corruption • Added a connection to EPICS • Allows for notification of all EPICS alarms • Otherwise a user must register an event • Significant Event System (SES) MICE DAQ and Controls Workshop

  20. L1 L2 L3 Collector /Router Data Logger Disk Front Ends Host Apps SE SE SE SE COOR SE SE SES Server RC FM SE Logger Alarm Watcher SE Log File SE FIL Message Key: SE = Significant Event FIL = Filter configuration RC = Run Control FM = Filtered SE Message  = Filter FM Alarm Display Guidance Files MICE DAQ and Controls Workshop

  21. Alarm Display MICE DAQ and Controls Workshop

  22. Python Interface • “Python is an interpreted, interactive, object-oriented programming language.” • A Python interface to Channel Access (C library) has been developed and extended to be almost object oriented • Tkinter and Python Mega Widgets used to develop graphical user interfaces (GUI) • Developed a GUI framework to speed development time and provide a consistent look and feel MICE DAQ and Controls Workshop

  23. IOC Resource Monitor Display Left click each tab tomove between displays. Each box is a PV Look for statusinformation. Processor name. MICE DAQ and Controls Workshop

  24. MICE DAQ and Controls Workshop

  25. Detector Configuration Management • The COMICS server manages the configuration of the detector • Receives load requests from: • Run control • Expert GUIs • Program APIs • Load map is a directed graph (tree) • Tree node (intermediate) • Establishes a layered hierarchy • Establishes an execution order • Action node (leaf) • Issues EPICS CA requests MICE DAQ and Controls Workshop

  26. S0 S2 S1 MUO SMT CAL CFT T0 DEV0 DEV1 DEV2 DEV3 Configuration Management Tree Root Node DØ Links determine the order of execution Intermediate Tree Node Configuration Data Action Node Uses EPICS Channel Access MICE DAQ and Controls Workshop

  27. Comics Expert GUI MICE DAQ and Controls Workshop

  28. Archiving Data • Maintain a history of PV values • Channel Archiver – EPICS tool • Fast sampling rates • Immediate analysis • Infrequent access to old historical data • Large files • Stored to tape once a week • EPICS/Oracle Archiver - DØ • Long-term studies • Slow sampling rates • Easy access to data at any moment • Minimal maintenance • Data stored directly in an Oracle database MICE DAQ and Controls Workshop

  29. Gateways • Accelerator • Gateway link to ACNET system • Bidirectional • Data access only (no control) • Cryogenics and Gas systems • Gateway link to DMACS system • Portable Channel Access Server – EPICS tool • Read-only • Data access only (no control) MICE DAQ and Controls Workshop

  30. CLIENTS xmlrpc Server CLIENTS xmlrpc REMOTE ToACNET ToFromITC CLIENTS xmlrpc ITC CACHE ToEPICS EPICS RECORDS CA EXPORT FromACNET xmlrpc FromEPICS CA D0 BD ACNET Gateway MICE DAQ and Controls Workshop

  31. EPICS at DØ - RunIIb • CanBus driver for EPICS • Weiner power supplies • Ethernet driver for EPICS • Gigabit Ethernet communication • Raw Ethernet protocol • Both use support from asynDriver – EPICS tool • Asynchronous Driver Support • “asynDriver is a general purpose facility for interfacing device specific code to low level communication drivers.” • “A primary target for asynDriver is EPICS IOC device support but, other than using libCom, it is independent of EPICS.” • Framework reduces development time. MICE DAQ and Controls Workshop

  32. Support for CFT • Device support for the AFE board using the MIL-1553 driver • AFE and AFE power supply templates • Record and device support for the SVX sequencers • Expert GUI for downloading • Does not use COMICS • Calibration software • Runs on processor in VRB crate • Communicates with AFE MICE DAQ and Controls Workshop

  33. Analog Front End Fiber MIL-1553 Communication Analog Front End Stereo Board Cryostat Wave guide VLPC Cassette MICE DAQ and Controls Workshop

  34. S e q u e n c e r S e q u e n c e r S e q u e n c e r S e q u e n c e r P r o c e s s o r V R B C V R B SVX Sequencer AFE MIL-1553 Communication V B D Calibration Software VME Level 3 MICE DAQ and Controls Workshop

  35. EPICS at Fermilab • SMTF • Superconducting module test facility • Cavity test in October • DOOCS for LLRF – speaks CA • EPICS for everything else • No ACNET – beams division controls system • ILC • Control system to be decided • Management structure now forming MICE DAQ and Controls Workshop

  36. EPICS Lessons • Three Layers • Tools • EPICS tools • OPI development - CA library • Applications • Build base • Build application - combine existing pieces • Develop device templates • Development • Records, device, and driver support • EPICS is not simple to use • Need expertise in each layer • Support is an email away • IOC operating system selection MICE DAQ and Controls Workshop

  37. The End MICE DAQ and Controls Workshop

More Related