EPICS – Future Plans - MKS 2 - DESY

Document Sample
EPICS – Future Plans - MKS 2 - DESY Powered By Docstoc
					                                        EPICS – FUTURE PLANS
       Matthias Clausen (DESY, Hamburg), Martin Richard Kraimer (ANL, Argonne, Illinois),
                      Jeffrey Owen Hill (LANL, Los Alamos, New Mexico),
        Kay-Uwe Kasemir (ORNL, Oak Ridge, Tennessee), Timo Korhonen (PSI, Villigen),
                               Leo Bob Dalesio (BNL, Upton, NY)

Abstract                                                      the main source for new developments is new projects.
   Over the last two decades EPICS has evolved from a         These kinds of developments are driven by local
basic set of control applications created for the Ground      requirements rather than global design specifications. In
Test Accelerator to a rich and reliable control system        the following we will describe that this evolutionary
framework installed in more than 120 locations                approach can still play an important role for the future of
worldwide. The continuous development of EPICS is             EPICS.
supported by the worldwide collaboration and
coordinated by a set of major laboratories. This procedure    IOC CORE SOFTWARE
ensures continuous quality checking and thus leads to            Development work continues in EPICS Base, although
stable production versions. The clear separation of the       the pace of change has slowed due to lack of effort, the
robust core software on the Input Output Controllers          increasing maturity of the code-base and a desire to
(IOC’S) from the channel access protocol and the              maintain an easy upward migration path for existing users
applications running on workstations and servers allows       and installations. Marty Kraimer's departure from
nearly independent software developments on all three         Argonne has also reduced the effort available for new
levels.                                                       development within the existing code-base. In contrast
This paper will describe the new developments on the          however the number of Operating Systems and
IOC side, which will increase robustness by adding            OS/Processor combinations that EPICS supports has
redundancy, and improve the management and the                increased, and still more targets are expected.
functionality. This includes the vision of a new Java-           The 3.14 branch of our CVS repository contains a
based IOC. The support for new data types will bring          number of minor enhancements made since the R3.14.9
more flexibility to the channel access protocol. New          release in February: Soft timing synchronization for
developments on the application side are clearly              RTEMS IOCs, a new VAL keyword in CALC
indicating that Java and Eclipse (e.g. Control System         expressions, and improved error reporting from
Studio – CSS, XAL and others) will form the basis for         dbLoadRecords being the main items of note.
many future applications..                                       We maintain a list of enhancements which could be
                                                              implemented in the existing code-base with relatively
                       STATUS                                 little effort, as well as lists of longer-term development
   Even though – or just because the EPICS core software      projects. The APS will be hosting a week-long Codeathon
has reached a mature state, it is time to think about the     (Coding marathon) in the spring of 2008 for core
long term future plans for EPICS. The core software is        developers to try and get some of the smaller items
running in several thousand IOCs around the world and         completed.
has proven to be at least as reliable as commercial              We are also hoping to have a visiting PhD student do
products. IOCs are running in several instances for           some work on automating our regression test suite in the
several years continuously. The collaboration is growing      next few months, which if successful will make the tests
continuously and every year new installations and             much quicker to run and the release process easier to
institutions decide to choose EPICS as their ‘control work    manage.
horse’.                                                          The EPICS Extensions programs distributed by the
   In order to keep the software up to date and meeting       APS have all now been converted to use the 3.14 build
state of the art requirements, there was an attempt in        rules, and we hope to have a new Windows Extensions
2003/4 to discuss the future of EPICS. Three meetings         installer built against Base version 3.14.9 very soon.
were carried out at Rutherford, Tsukuba and Santa Fe
                                                              Driver Support
under the title ‘EPICS-2010’. As a result a list of desired
features was composed. In contrast to the mutual                 The Asyn Driver IOC support module is another
agreement that it would be important to work on these         package that has progressed quite a lot recently, mainly
subjects there was no straight answer how these               due to the efforts of Mark Rivers. Asyn provides
developments could be funded. Several unsuccessful            standardized and cross-platform communications
attempts were made to apply for funding dedicated to          interfaces over RS232, RS485, TCP/IP, UDP/IP, GPIB
EPICS-2010 developments. As a result one can state that       and VXI-11 protocols, and can also be used for register-
                                                              based synchronous I/O devices as well as for
asynchronous message-based I/O. EPICS Device support            to today’s standards for heterogeneous IOC nodes and so
written for the old devCommonGpib package can be used           on.
with Asyn, and for new devices the Streams module from            The main design goals for the new time service are:
the Swiss Light Source provides an easy way to support             Provide a robust time service that has a well-defined
moderately complex protocols over any Asyn port. Asyn                behaviour
can be used to control PLCs using various flavors of               The design should allow adding user’s preferred time
MODbus as well as via DirectNet, and all these                       services (modularity)
communications modules are portable to any Operating               The system should have fallbacks in case some
System that supports EPICS and the necessary interfaces.             service has problems (reliability)
Java IOC                                                           Switching between the different time services should
                                                                     be as smooth as possible (monotonously progressing
   A rich list of ideas has been collected throughout the            time)
EPICS 2010 meetings. Some meetings of the EPICS core              The new time service is mainly based on the General
were taking place to identify items which could make it         Time idea [1]. In this structure, there is a lightweight time
into next releases of the EPICS core distribution. Funding      source manager and then a number of time providers. The
and restructuring in institutions inhibited to continue these   set of time providers can be configured for each IOC
efforts. Fortunately the development of the Java IOC            separately. A time provider needs a driver that gets the
started independent from the core development.                  time from a time service (IOC clock, NTP, timing system,
‘Fortunately’ - because new ideas can be investigated in        etc.) The time providers are organized like a stack and
this development without having to worry about                  have the notion of validity.
reliability and compatibility in the first place.
   Two projects are actually funding Java IOC                   Redundancy
developments:                                                     The demands for high availability (HA) controls are
    A Small Business Innovative Research grant                 nowadays mainly driven by new light sources which are
    BACnet Interface/ Gateway                                  currently under construction or in the design phase.
   The core features of this new development can be             Availability numbers of 99.8% and more can only be
summarized as follows:                                          achieved when utilities like power, water or cryogenics
    Hierarchical database definition                           (nearly) never fail. Continuous operation of the control
    Implementation the notion of ‘Device/ Property/            systems in charge can only be achieved with redundant
      Characteristics and Commands’                             font end controllers.
    Decoupling of data processing from the control               The support to operate a redundant pair of IOCs has
      system protocol                                           been implemented at DESY [4] to meet the requirements
    Decoupling of data processing from data acquisition.       for continuous operations of the cryogenic installations
                                                                for the XFEL.
   The creation of a table record which includes in the           The implementation consists of three major
hierarchy a set of motor records, which are composed of a       components:
set of binary I/O and analog I/O as well as position               The Redundancy Monitor Task
outputs and readbacks, provide a demonstration of a                   This is an OS and EPICS independent
hierarchical record. The proof of concept (passing data               implementation to supervise the state of so called
from a BACnet device to a channel access client) is part              primary redundancy resources (PRR).
of the BACnet project. This will demonstrate the potential         The Continuous Control Executive
of this development. A potential application for this                 This task is supervised by the RMT. It’s purpose is to
project is to support the data representation for high level          continuous synchronize of the two redundant EPICS
physics applications.                                                 databases.
                                                                   The State Notation Language (SNL)-Executive
Timing Support                                                        This task synchronizes SNL programs between two
  Time stamping of EPICS channels is based on the IOC                 IOC’s over the dedicated Ethernet link
nodes delivering the time, which is naturally the solution        An XML based protocol has been implemented to
that provides the best performance. However, it requires        monitor and control the RMT and all the registered
that the IOCs need to keep themselves in the correct time.      processes (like CCE, SNL-exec, drivers …) In
This has been so far achieved with a custom written             conjunction with a user interface plugin for CSS it is now
package (many platforms do not necessarily have good            possible to monitor and control IOC core functionalities
timekeeping services built-in.) This time service               remote.
contained all the services for an IOC to maintain its local
time in a single monolithic package. The design had             State Notation Language Support
several shortcomings: difficult to understand, tailored to a      State notation programs are providing the second level
specific system (vxWorks), the functionality was not up         of interaction with the controlled process. Depending on
the programmers desire record processing or SNL               performance data transport providing the basic support for
programs can be used for continuous operations – like         the data being processed on the IOC. Only basic changes
supervisory programs. State oriented controls are the         over a ten years time frame make sure that the
domain of SNL programs, like startup-, shutdown- or           compatibility between old and new client/ server
recovery procedures.                                          connections is guaranteed. This is an important factor for
   The functionality of the SNL package has been              sites which have to support a mixture of ‘legacy’ systems
continuously improved. It is currently hosted by SLAC.        running old EPICS versions in parallel with applications
The development support on the other hand is                  running the latest EPICS CA protocol stack.
traditionally relatively poor. This will be improved by a        This conservative approach implies that new features
new language sensitive editor based on the Eclipse C/C++      make it only very slowly into new CA releases. One
Development Tooling (CDT), which is currently under           example is the support for flavoured data being developed
development. The final tool can be loaded as a plug into      for the Los Alamos Neutron Science (LANSCE) control
Eclipse as well as into CSS. It will be available from the    system.
DESY CSS-Update site [6].                                        Another approach is the integration of new protocols
                                                              into the EPICS control domain. New developments on the
EPICS goes Embedded                                           IOC (Java IOC) and on the application level (Control
  A good example for developments to run EPICS on             System Studio) will create opportunities in this direction.
small – or embedded hardware is the APS booster magnet
upgrade at Argonne for top off operation. It requires new     Channel Access
instrumentation to meet increased magnet ramping                 Currently, the subscription update event queue in the
requirements. To address these requirements, the APS          EPICS server is capable of carrying event payloads
Instrumentation and Controls groups collaborated to           consisting always of the channel's value, time stamp, and
design a new control system module called the Mini IOC.       alarm state. The complexity of the LANSCE macro pulse
The Mini IOC hardware is based on a commercial                beam gates requires unique capabilities from the control
evaluation board containing an FPGA with embedded             system - which is currently a hybrid of EPICS and also
processor and built-in interfaces for 128MB of DDR            the original LANSCE Data System. The favoured
SDRAM and Ethernet. A custom module is used for               configuration after an upgrade would be a homogeneous
analog controls and monitors. The PowerPC embedded            EPICS based system with a tool based approach to the
processor runs an EPICS database built on the VxWorks         development of modular application programs, but this
operating system allowing remote access via Ethernet.         has evolved new requirements for enhanced capabilities
  Other developments are targeting to run EPICS on PLC        within EPICS. Specifically, EPICS Channel Access (CA)
hardware. Since version 3.14 EPICS core has been              clients need to dynamically specify the LANSCE macro
unbundled from the VxWorks specific system calls. This        pulse beam gate combinatorial (LANSCE Flavored Data),
has increased the flexibility to run EPICS on ‘any’           and the window in time (LANSCE Timed Data), to be
supported operating system.                                   sampled when they subscribe. EPICS upgrades fulfilling
                                                              these requirements, including generic software interfaces
                  CA GATEWAYS                                 accommodating site specific event queue payloads and
   Channel Access (CA) gateways are in operation in           client specified subscription update filtering expressions
many places. They allow separating the controls network       are being installed into the EPICS core software so that
from the office network or even public networks. Besides      the needs of LANSCE can be accommodated consistent
this security aspect gateways also optimize the number of     with the EPICS project and device portable model.
CA connections to the IOCs because several CA clients         These upgrades will greatly improve the versatility of the
can share one connection to an individual IOC.                original EPICS system expanding its intersection into the
   Due to these important functionalities gateways play a     domain of data acquisition systems[13].
growing role in today’s installations. Performance and
functionality have been continuously improved over the                     BASIC APPLICATIONS
last years. The availability of this service is key for          Basic applications for archiving, alarming and display
machine operations in many places. This was the driving       have been part of the EPICS framework from the very
force to implement redundancy also for the CA gateways.       beginning. Several of these went through various kinds of
The development was carried out based on the                  development stages. New versions of the same kind and/
applications – namely RMT – which are already available       or completely new functionalities were implemented by
for redundant IOC’s [12].                                     different collaboration members.

                    PROTOCOLS                                 Archiving
  The Channel Access (CA) protocol between the IOCs             Archiving is a core control system functionality.
and the applications has been designed for a reliable, high   Several stages of development resulted in the required
                                                              performance for data storage and retrieval of recent
history, using either custom data files or highly                Built on Eclipse which itself is built on OSGi
specialized relation database setups. Long-term retrieval        Provides core functions like: Logging, XMPP based
and maintainability often suffered, and new approaches at         management, common data types for data exchange
TJNAF and ORNL now re-evaluate the more                           and drag and drop, common interfaces to control
conventional use of relational databases.                         systems DAL (Data Access Layer) and to archive
                                                                  data AAL (Archive Access Layer).
Archive Displays                                                 Easy extensible by Eclipse compliant plugins.
   The ‘DataBrowser’ from SNS is integrated into the
CSS operator cockpit and based on a common archive            CSS-Synoptic Display Studio (SDS)
interface. This generic approach to visualize archived data      The core components for operator interactions with the
together with real-time data is very promising.               controlled process are synoptic displays. All of the
                                                              existing display applications are written in ‘C’/ C++.
Alarming                                                      They are using Motif for their graphics.
   Record processing on the IOC includes alarm handling          The SDS is designed to run in the CSS context as an
as part of the core functionality. All EPICS records          Eclipse plugin. The core graphic technology is GEF – the
calculate alarm settings whenever they get processed.         graphical editing framework. This framework provides a
This rich feature is still not used adequately in today’s     rich set of functionalities. The most prominent advantage
EPICS installations. The standard alarm handler (alh)         in using GEF is the extensibility to create and add new
only handles those alarms which have been configured in       graphical widgets in the form of Eclipse plugins.
its individual configuration file. This way alarms are only      A generic conversion tool has been created to convert
monitored if the fields in the record are set to trigger      existing configuration files into SDS readable XML files.
alarms – and – if a client application (typically alh) is     This way the investment into the actual synoptic tool can
monitoring this channel.                                      be saved. SDS is available in version 0.9.9 and about to
   The approach to push any triggered alarm from the IOC      get ready to go into production.
to the outside is already in operation for long time at the
D0 experiment. A generic implementation based on Java         Web Based Applications
Message Services (JMS) is now also available [5]. As one        Besides the CSS developments for a rich client
of the basic features it makes sure that any alarm being      platform application (RCP), there are also developments
pushed from an IOC will get written to a relational           going on to improve the support for Web based
database. In addition a new set of alarm views is             applications. Web applications gain importance for remote
available as part of CSS – from the CSS update site [6].      process controls. Future will tell how Web applications
This includes new tools to filter alarms and to trigger       and RCP applications will be used in the EPICS
actions like GSM messages.                                    community.

             OPERATOR COCKPIT                                                     TOOL KITS
  Key EPICS operator interface tools are limited to
X11/Motif, only few were ported to MS-Windows. Other          MMLT
problems include:                                                Matlab Middle Layer Toolkit is a set of Matlab
   Different look and feel                                   applications for the commissioning and beam studies of
   Lack of data transport between tools                      3rd generation lights sources. Developed at LBL and in
   Program design and dwindling number of                    use at Spear, Diamnod,CLS, and ASP, this toolkit
    programmers familiar with the older technologies          provides an extensible platform for physics applications.
    make changes or extensions impossible.                    XAL
                                                                XAL is a Java framework for developing accelerator
Control System Studio (CSS)                                   physics applications for the commissioning and operation
   CSS is meant to be the answer for future operator          of the Spallation Neutron Source at Oak Ridge. It was
applications. The development of CSS started in 2005          designed to be extensible and has evolved to support
with a workshop at DESY. Meanwhile version 1.0.0 of the       ongoing accelerator operations. XAL has a growing user
CSS-core been released. The CSS idea is well accepted by      base. Being written in Java and configurable by SMF
a growing group of developers. It’s already in production     (XAL standard machine format) configuration files, XAL
at SNS (DataBrowser) and at DESY (alarm- displays and         provides an open well accepted standard for accelerator
– configuration). CSS is not limited to user interface        physics applications.[8]
applications, as exemplified by headless Java applications    SEAL
that use the CSS core management facilities.
   CSS features in short [7]:                                   The SLAC Eclipse Accelerator Lab (SEAL) [9] is a
                                                              new development for the LCLS at SLAC. As already
documented in the name, SEAL is based on Eclipse.
Several XAL applications will be integrated as plugins             Better time support
into SEAL. General purpose (EPICS) tools will be                   New display manager: Should be not Motif based;
integrated by CSS.                                                   should be able to read all existing configuration file
RDB-Based Database Generation                                      Redundancy for IOCs
   There are two different – but not conflicting – methods         Support to store/handle alarms in RDBs.
to handle EPICS configuration databases: The descriptive           Better/ more support to create IOC databases from
way and the prescriptive way. Two prominent examples                 RDBs.
for these approaches are: EPICS-ORA [10] and IRMIS                 From this list one can draw the conclusion that some
[11].                                                          tasks never get done right for all users – like
   RDB-based, or at least RDB supported creation and           documentation. Some things will stay forever on the list –
management of EPICS configuration databases is an              like better information about new developments or online
essential item on the wish list of many senior control         changes, and some things really get done – like the things
system managers. So far only the IRMIS approach has            in the second part of the list.
found its place in many EPICS installations. Creating
configuration databases from a RDB seems to be much                                  OUTLOOK
harder then managing these with a RDB.
                                                                  EPICS has reached a very mature state. This is the
            THE COLLABORATION                                  keystone for applications like redundant IOCs and IOC
                                                               core software running on FPGA PPC cores. Continuous
   A recent poll in the EPICS community has clearly            improvements keep the code up to date. New
identified the collaboration itself to be one good reason to   developments like the Java IOC and CSS show that
start and continue to use EPICS. Close contact to the          maturity and new innovations can coexist. Support and
developers and a fast responsive mailing list are essential    experience in industry is still growing. The EPICS
element of the success story. ‘There’s no free beer, but       collaboration itself is the most valuable part of the EPICS
always help’. This might be a good description. ‘Once I        toolkit.
have solved my problems, I will share my solution to help
others’… might be another way to describe the work in
the collaboration. The whole collaboration works on a
voluntary basis. This is undoubtedly the most difficult        [1] D.Thompson,S.Peng,, K.Kasemir, “General Time
fact to describe to commercial partners.                            Proposal”,(
                      INDUSTRY                                 [2] Event System by Micro-Research Finland,
  EPICS has reached the state of a de facto standard for  
machine controls. Companies provide EPICS drivers for          [3] Event Time Driver for General Time, B. Kalantari,
their hardware or design hardware for EPICS                         EPICS Meeting ’07, (
applications. The EPICS core has been ported to several             e2/e127/e183/e176/EPICS-agenda-2007-11.htm)
platforms by industry. Turn key systems with EPICS             [4] Redundancy for EPICS IOCs, M. Clausen et. al., this
support have been purchased in several places.                      conference, MOPA03
  Companies were formed by former members of the               [5] Alarm package load page
EPICS community. This way it is possible to purchase           [6] CSS           Update         site       at      DESY:
professional EPICS support.                               
                                                               [7] Control System Studio (CSS) Jan Hatje et. al., this
   WISHLIST FOR FUTURE RELEASES                                     conference MOPB03
                                                               [8] Thomas Pelaia, “XAL Status”, this conference,
  In a limited poll about missing features – or wishes for          MOPB02
future releases – the following topics seem to be of           [9] P. Chu, “High Level Application Framework
general interest:                                                   for LCLS”, this conference TPPA13
   Documentation: A ‘real’ beginners document. An             [10] Chr. Gerke,”Process Control: Object-Oriented
     updated record reference doc.                                  Model for Offline Data”, this conference, RPPA12
   Code examples for drivers, records, etc.                   [11] Don Dohan, “The IRMIS Universal Component-Type
   Better information within the collaboration about               Model”, this conference, TOPA03
     new developments.                                         [12] Artem Kazakov, “Redundant EPICS IOC in PC-
   Better support for RTEMS. E.g. a VxWorks to                     based Unix-like Environment”, this conference,
     RTEMS converter.                                               TPPA31
   Dynamic (online) record addition in IOC databases.         [13] EPICS CA Enhancements for LANSCE Timed and
   Better VDCT support.                                            Flavored Data, J. Hill, this conference, WPPA24

Shared By: