Interfacing EPICS and Mon ALISA Peter Zumbruch Experiment
Interfacing EPICS and Mon. ALISA Peter Zumbruch Experiment control systems group GSI (KS/EE) March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI
Overview • What is EPICS? • What is Mon. ALISA • Interfacing EPICS and Mon. ALISA • Summary March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 2
What is EPICS? (Getting Started with EPICS: Introductory Session I ) A Control System Architecture Network-based “client/server” model (hence the EPICS logo) CA Client Network CA Server For EPICS, client and server speak of their Channel Access role i. e. Channel Access Client & Channel Access Server March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 3
What is EPICS? … short answer: EPICS: Experimental Physics and Industrial Control System … a bit more elaborate: EPICS is a set of Open Source software tools, libraries and applications developed collaboratively and used worldwide to create distributed soft real-time control systems for scientific instruments such as particle accelerators, telescopes and other large scientific experiments. (From the EPICS Home Page: http: //www. aps. anl. gov/epics/) … striking - is three things at once: • A collaboration of major scientific laboratories and industry ( > 100) • A world wide collaboration that shares designs, software tools and expertise for implementing large-scale control systems • An architecture for building scalable control systems • A client/server model with an efficient communication protocol (Channel Access) for passing data • The entire set of Process Variables establish a Distributed Real-time Database of machine status, information and control parameters • A Software Toolkit of Open Source code and documentation • A collection of software tools collaboratively developed which can be integrated to provide a comprehensive and scalable control system March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 4
Ten really neat things about EPICS (Getting Started with EPICS: Introductory Session I) • • • March 3, 2008 It’s free It’s Open Source There are lots of users All a client needs to know to access data is a PV name You can pick the best tools out there … … or build your own The boring stuff is already done There is a lot of expertise available close by A good contribution becomes internationally known By following a few simple rules, you get a lot for free Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 5
EPICS and FAIR / GSI Experiments showing interest or more in usage of EPICS • • Nu. STAR CBM (Embedded controls) FRS (HV controls HADES – running complete experiment control system • PANDA March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 6
Mon. ALISA “MONitoring Agents using a Large Integrated Services Architecture“ Is a distributed service able to: • collect any type of information from different systems • analyze this information in real time • take automated decisions and perform actions based on it • optimize work flows in complex environments Read more at http: //monalisa. caltech. edu from: Online Monitoring with Mon. ALISA – D. Protopopescu – Dubna 2007 March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 7
Uses Monitoring distributed computing, i. e. GRIDs Ø Optimizing flow in complex system (VRVS, optics cable networks) Ø ALICE also uses ML for monitoring online reconstruction Ø Some benchmark figures for the service: Ø ~ 800 k monitored parameters at 50 k updates/second Ø > 10 k running (alien) jobs monitored simultaneously Ø > 100 WAN links Ø from: Online Monitoring with Mon. ALISA – D. Protopopescu – Dubna 2007 March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 8
Advantages • • • Mon. ALISA is simple to install, configure and use Ap. Mon APIs are available in C, C++, Java, Python and Perl ROOT plugin allows macros to send data directly to Mona. LISA Can easily interface with (or sit on top of) any existing or future slow controls subsystem (epics, pvss) Data is stored in a standard Pg. SQL (or My. SQL) database that can be accessed by other applications, independently of ML Automatic data summarizing Several data repositories (and hence DBs) can exist (local and remote) Easy access via Web. Service (WS) from service and/or repository Fully supported by development team; work is being done in this direction from: Online Monitoring with Mon. ALISA – D. Protopopescu – Dubna 2007 March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 9
Capabilities Based on monitored information, actions can be taken in: § ML Service § ML Repository Actions can be triggered by: § Values above/below given thresholds § Absence/presence of values § Correlations between several values Possible actions types: § External command § Plain event logging § Annotation of repository charts; RSS feeds § Email § Instant messaging from: Online Monitoring with Mon. ALISA – D. Protopopescu – Dubna 2007 March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 10
Interfacing First approach: – Perl Script • Using Ap. Mon module of Mon. ALISA • Calling caget / camonitor / caput commands of EPICS • Later, with help of POE module (process on event) change on event could be implemented March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 11
Setup CERN Proxies GSI lxi 003: MLD start Service Repository http: mlr 1. gla. ac. uk: 7002/epics/edit. jsp Ap. Mon Cha event_pub. pl using caget/camonitor/caput nne l Ac GLASGOW ces s GSI lxdv 18: EPICS IOC March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 12
Screen shots (1) March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 13
Screen shots (2) March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 14
In future … Next approach: – Implement Mon. ALISA‘s API. c/c++ • Create EPICS Device Support Module for Mon. ALISA • Maybe simpler “sub routine record“ approach March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 15
Summary 1. Thanks to 1. Dan 2. Costin 3. Catalin 4. Kevin at the 1 st DCS Roundtable in Glasgow 2. EPICS Process Variables can be read and manipulated by Mon. ALISA 3. The reverse mechanism is not foreseen 4. Performance test not yet done. March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 16
Thank you for your attention. For more information … Have a look at the extra slides. March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 17
Extra slides March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 18
Vocabulary (Getting Started with EPICS: Introductory Session I) • EPICS – Experimental Physics and Industrial Control System • Channel Access – The communication protocol used by EPICS • Process Variable – A piece of named data referred to by its PV name – The primary object of the Channel Access Protocol • Channel – A synonym for Process Variable • Channel Access Server – Software that provides access to a Process Variable using the Channel Access Protocol • Channel Access Client – Software that requests access to a Process Variable using the Channel Access Protocol March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 19
Vocabulary (Getting Started with EPICS: Introductory Session I) • IOC – Input Output Controller – A computer running ioc. Core, a set of EPICS routines used to define process variables and implement real-time control algorithms – ioc. Core uses database records to define process variables and their behavior • Soft IOC – An instance of ioc. Core running as a process on a “non-dedicated” computer (i. e. a computer that is performing other functions as well) • Record – The mechanism by which a Process Variable is defined in an IOC (using ioc. Core) – Dozens of record types exist, each with it’s own attributes and processing routine that describe its functionality March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 20
What is EPICS? • Process Variable – A Process Variable is a named piece of data with a set of attributes – Examples of Attributes: • • March 3, 2008 Alarm Severity (e. g. NO_ALARM, MINOR, MAJOR, INVALID) Alarm Status (e. g. LOW, HI, LOLO, HIHI, READ_error) Timestamp Number of elements (array) Normal Operating Range Control Limits Engineering Unit Designation (e. g. degrees, mm, MW) Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 21
How does it do it? (Getting Started with EPICS: Introductory Session I) Channel Access Client Channel Access Server Process Variables: S 1 A: H 1: Current. AO S 1: P 1: x S 1: P 1: y S 1: G 1: vacuum March 3, 2008 Computer Interface Power Supply Computer Interface Beam Position Monitor Computer Interface Vacuum Gauge Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 22
Where does it do it? g M ul o at de io li n/ ng A / na ly si C s on fig C on ur tr atio ol n in di D ng at /A a rc hi v A Se ut qu om en at c i ic ng Si Tr m Channel Access Client en O C pe on ra st tio ra na in l ts in Ala g/ rm R ep or tin g C lo C sed on -l tr oo ol p gg Channel Access Client Lo R em M ote on C ito on rin tro g l & (Getting Started with EPICS: Introductory Session I) Channel Access Client Channel Access Server in Da g/ ta A rc hi vi ng en d Tr C es s A Se ut qu om en at ci ic ng C sed on -l tr oo ol p Vacuum Gauge lo Computer Interface A la cu r Se cc Beam Position Monitor C A S 1: P 1: y ity n ct io et e Computer Interface D rm ioonve D c. Crsio ata onr/Filte e ring S 1 A: H 1: Current. AO S 1: P 1: x Power Supply Computer Interface O C pe on ra st tio ra na in l ts Process Variables: S 1: G 1: vacuum March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 23
Channel Access in One Slide (Getting Started with EPICS: Introductory Session I) “connection request” or “search request” “get” or “ca. Get” Who has a PV named “S 1 A: H 1: Current. AO”? “put” or “ca. Put” “set a monitor” Change its value to 30. 5 Notify me when the value changes What is its value? Channel Access Client CA Server Channel Access Server Process Variables: I do. 25. 5 AMPS “put complete” S 1 A: H 1: Current. AO S 1: P 1: x or 30. 5 is too high. It is now set to the maximum value of 27. 5. or You are not authorized to change this value S 1: P 1: y S 1: G 1: vacuum March 3, 2008 OK, it is now 30. 5 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI It is now 20. 5 AMPS 10. 5 AMPS It is now 0. 0023 AMPS “post an event” or “post a monitor” 24
What is EPICS? (Getting Started with EPICS: Introductory Session I) Channel Access clients are programs that require access to Process Variables to carry out their purpose Strip. Tool MEDM CAC The “service” that a Channel Access server provides is access to a Process Variable* CAS Process Variables * A Process Variable (PV) is a named piece of data. March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 25
What is EPICS? (Getting Started with EPICS: Introductory Session I) Any tool/program/application that abides by the Channel Access protocol could be described as “EPICS Compliant”. EPICS can be viewed as a “toolkit” of EPICS compliant programs. One can select the appropriate tool for their need or develop their own. My Special Data Collection Program Strip. Tool MEDM CAC CAS My Accelerator Simulator Code CAC CAS CAC ioc. Core Lab. View (PVs) March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 26
Displays and Controls 1 3 2 (1 -3) Examples from HADES 4 March 3, 2008 Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 27
Typical Realizations of an EPICS System (Getting Started with EPICS: Introductory Session I) With Release 3. 14, the operating system limitations for ioc. Core have been removed. IOC IOC Commercial Custom Instruments Chassis/Panels Technical Equipment March 3, 2008 RTEMS IOC CAS Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 28
So What Does it Do? • EPICS tools are available to accomplish almost any typical Distributed Control System (DCS) functionality, such as: – – – March 3, 2008 Remote Control & Monitoring of Technical Equipment Data Conversion/Filtering Access Security Equipment Operation Constraints Alarm Detection/Reporting/Logging Data Trending/Archiving/Retrieval/Plotting Automatic Sequencing Mode & Facility Configuration Control (save/restore) Modeling/Simulation Data Acquisition Data Analysis Interfacing EPICS and Mon. ALISA - Peter Zumbruch, GSI 29
- Slides: 29