|
EPICS Version 4 |
| HOME | DEVELOPMENT | DOWNLOAD | DOCUMENTATION | FEATURES | WORKING GROUP | SOURCEFORGE PROJECT | FAQ |
This is the homepage of EPICS Version 4, a software toolkit for writing the control system and online scientific services of large experimental facilities.
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 a particle accelerators, telescopes and other large scientific experiments.
|
What is EPICS Version 4?EPICS Version 4 (V4) brings support for managed distributed data acquisition, service oriented architecture, and complex data structures to EPICS. In an EPICS installation it is expected that control and module support would be done with EPICS V3 IOCs, while middle layer and SOA operations would be done with EPICS V4. V4 includes support for protocol interoperability with V3. In short, EPICS V4 includes EPICS V3. EPICS V4 is composed of a number of core standards and APIs, reference implementations of those standards in C++ and Java, plus associated other components and tools. The intention is for the standards and APIs to go through a public review process, leading to published protocols and APIs that may be independently implemented. The work adds support for "structured" data to EPICS records. That is, a PV's value need no longer be a simple type or a waveform, but potentially an arbitrarily complex structure. A "Remote Procedure Call" like processing pattern has been added, which supports passing arguments within the context of asynchronous record processing. In this way services may be defined. A new IOC design supports the protocol and new record architecture for high efficiency services and controls. The EPICS V4 Working Group is a collaborative effort to define, publish, and provide reference implementations for, the EPICS V4 standards. The group is chartered to provide open protocols and standards for both controls and services interconnection through a public process. EPICS Version 4 Components in a NutshellIn EPICS V3 and before, an IOC (Input/Output Controller) is a network node that controls and/or monitors a collection of devices. An IOC contains a memory resident real time database. The real time database has a set of "smart" records, which are interconnected in a Data Flow pattern. In EPICS V4, pvIOC is the implementation of an EPICS IOC. A pvIOC is similar to an EPICS Version 3 IOC (at least the 3.13 and 3.14 releases of EPICS base) but extends the data types to support structured data. These data objects, simple or structured, are defined through the pvData interface. So, records are processed by pvIOC, the PV data I/O is described through pvData, and the client - IOC interconnect is through a new protocol for structured data, pvAccess. APIs exist also for synchronous or asynchronous services for accessing a set of V3 IOCs and/or pvIOCs. Facilities for managing coordinated collections of acquisitions will be the focus of work in early 2012. Overview of EPICS version 3 and EPICS version 4 provides a brief overview of EPICS version 3 and EPICS version 4 and interoperability between them. The core part of each is discussed. For version 3 the components that come with EPICS base are discussed. For version 4 pvData, pvAccess, and pvIOC are discussed. There are also "extensions" of EPICS V4 being developed, see Tools, Accessories and other Associated Work below V3/V4 InteroperationVersion 3 of EPICS uses a communications protocol named "Channel Access". Version 4 uses a new protocol called "pvAccess". Interoperability between the two protocols, their APIs, and record processing, is provided by the Version 4 module called CAV3. This module can be used server or client side. For the use case class of V3 clients calling V4 IOCs, CAV3 used server side in a V4 IOC allows a V3 Channel Access client access to data classes that are possible under channel access (ie simple type and waveform only). For the use case class of V4 clients using V3 IOC channels, pvAccess provides two mechanisms. Firstly, pvAccess user agents can be configured to use unmodified Version 3 IOCs through the "CAV3" provider of pvAccess in which case Channel Access is the wire protocol, called through the pvAccess API (however, this is new and has not yet been documented). Secondly, pvAccess user agents may configured to use modified V3 IOCs where the pvAccess wire protocol connects to a pvAccess server residing on a V3 IOC. The pvAccess server support (the second option above) is part of pvaSrv, see in particular the description of V3Channel, which is the embedded V3 IOC support that provides access to V3 record data for pvAccess network clients.
A full description and EPICS V4 users guide to V3/V4 interoperability, is being prepared (see Charter deliverable 10). In the meantime, see the talk V3/V4 Interoperability, Marty Kraimer, EPICS Collaboration 2012 spring meeting, (SLAC), PPT. PerformanceVery preliminary performance graphs for pvAccess floating point acquisitions are given below, together with comparable Channel Access acquisition. The setup is C++ clients and servers, of the Beta 1.0.1 release (as on the downloads page), 2 MacBook Pros (~2GHz Intel Core Duo-s, 4GB memory) with a 1 GBit Ethernet point-to-point connection. The acquisition is a GET operation, on a double array value (DBR_DOUBLE and pvAccess equivalent), varying in both cases the value array size. Note that in addition to raw network encoding and deserializing performance, in a real world implementation pvAccess could achieve much higher apparent performance since it additionally has the capability to transfer only actually changed structure field values.
Summary StatusThis section is a very short summary of the status of EPICS V4 overall, and gives help on how an interested engineer might want to use it now. Last updated Oct-2012: EPICS V4 has been in beta since December 2011. The core standards of EPICS V4, and their implementations, are complete with respect to the January 2012 charter milestones. The beta 1 is useable for testing the technology for distributed high level data services. Beta 2 is now being developed and will be released shortly. Beta 2 improves the data model for describing complex data, improves the IOC side framework for interfacing V4 systems to EPICS V3 records, provides command line get, set and monitor commands, and a greatly simplified framework for high performance Remote Procedure Call (RPC) style servers. Initial production level services based on EPICS V4 have been deployed at BNL, PSI, and Diamond. A summary of the installation architecture used by PSI for EPICS V4 based services implemented in Java, has been published as a pattern for new adopters. Recent work added unsigned integer support, improving programmer ease of use, and the pvAccess and Normative Type specifications. The specification of pvAccess has just been expert reviewed and is now being published at Second Public Working Draft. The definitions of the interoperable data types, "Normative Types" is approaching First Public Working Draft. In acute summary, support for managed distributed data acquisition is quite far along and can be used now. This includes acquisition from EPICS V3 PVs via EPICS V4 tools or components. The basis for services and "RPC in EPICS" is complete, and there are example services in Java and C++. Largely documentation is up to date with respect to implemented code. The primary area in which EPICS V4 is not yet ready for use is that part which is the core value of the EPICS V3 IOC, record processing for controls. This is because we are adding to EPICS first, then will re-implement the exiting excellent functionality in EPICS version 3. See below for a complete breakdown. The next year will concentrate on V3 - V4 interoperability and interface, and work to support high performance V3 IOC data acquisition through V4 services, such as accessing NDArray data through a V4 Normative Type and sequential monitors. Additionally, the V4 IOC will be designed. The charter to cover work over the next year is now being developed. Comments on what should be included are welcome. Summary Usage Contexts of EPICS V4 Given Present StatusThis section outlines how one might use EPICS V4 right now, given its present status EPICS V4 includes EPICS V3. It is expected that, for a significant period of time, an institutional user of EPICS Version 4 would use it in parallel with the EPICS version 3 distribution. In particular, EPICS Version 3 would continue to be the basis of controls. In its present state, EPICS Version 4 concentrates on so called "high level" software services. It provides a platform for fast Service Oriented Architecture and distributed message passing. Its programming model is optimized for efficient distributed synchronous or asynchronous processes communicating by essential a shared-memory system based on data introspection. In a hybrid environment, EPICS V4 is at BETA for use for managed distributed data acquisitions. See the Gather service framework. This is a server side software framework that uses the new facilities of EPICS V4 to help a user define, save, and execute, a named coordinated acquisition of many V3 PVs. The Gather service framework is alpha stage software; it's complete, but not yet field tested. Contact Marty Kramer or Guobao Shen at BNL. See also pvManager, which is a client side tool for making acquisitions of a large number of PVs efficiently. pvManager is mature enough for use now, contact Gabriele Carassi at BNL. Also Although record processing is presently part of EPICS V4, it is not mature enough to supplant EPICS V3 record processing and device support for controls. This is expected to be undertaken in the next year. Contact Bob Dalesio (BNL), Marty Kramer (BNL) or Matej Sekornaja (COSYLAB) for more details and estimates. However, note that EPICS V4 clients can interface to EPICS V3 IOC record processing via pvAccess through use of the pvAccess Server (PAS). See worked example in Getting Started with EPICS V4. Present DeploymentsEPICS V4 is also being used now developing beamline image data acquisition and storage, using the facilities of pvData for structured data. Contact Dave Hickin at DIAMOND. It will shortly also be deployed at PSI for back end SQL database access. Software Specifications and ImplementationsEPICS V4 is a body of core specifications, reference implementations, and some associated tools. The core specifications, we call "normative". The normative specifications will be open, collaboratively defined, and may be implemented and extended by any interested party. We provide reference implementations for adopters of EPICS V4, and to test the specifications' performance and effectiveness. Associated other documents are "non-normative" and no guarantees will be made about them. Normative ImplementationsThis lists the "core" modules of EPICS V4, where to see the source code, reference documentation, and programmers documentation (Javadoc and DOxygen).
Extensions, Tools, and Associated ActivitiesA number of software projects are associated with EPICS V4. Some of the above are in scope of the EPICS Version 4 working group specifically, and others not. Those in scope are being managed as part of the deliverables of the group, though they are not considered normative, and should not be considered all at the same level of release as the normative specifications (Beta at the time of writing).
Software DevelopmentSee the EPICS V4 Development page for complete references to code and documentation. in particular, see Getting Started with EPICS V4 for how to acquire and use EPICS V4. It includes help on Java and C++ development, and references to examples, including interfacing to EPICS V3 data. EPICS version 4 Beta 2 is available now from the SourceForge download site, as Java Jar files and a tar zip for C++. All of the normative projects above are each in distinct mercurial repositories in the SourceForge project epics-pvdata. There are separate Mercurial repos for each of the C++ and Java implementations of each normative project. They can all be checked out via the unix shell command hg, or using a Mercurial client suitable for your platform. Download from the Mercurial repositories can be done anonymously, or using a sourceForge account, see Getting Started with EPICS V4. Initial examples to check out:
JavaJava development help is given for Eclipse, or Maven. Help for both are given in Getting Started with EPICS V4. The relevant Mercurial modules are: pvDataJava, pvAccessJava, pvIOCJava, exampleJava. C++ and PythonThe C++ and Python code also uses the mercurial repository. The EPICS V3 build system is used rather than Eclipse. V3 libCom is used for threading and other support. Thus it requires that you have a recent release of EPICS base. These are the relevant sourceforge mercurial modules: pvDataCPP, pvAccessCPP, pvIOCCPP, pvaSrv, pvServiceCPP, exampleCPP. See Getting Started with EPICS V4 |