EPICS 7

EPICS 7 is the latest version in the EPICS ecosystem, with the previous being EPICS V3 and V4.

By Gregor Gregorič

EPICS V3 is the version that most people are familiar with and its use is widespread with exceptional documentation. EPICS V4 has been under development for some time now but has not yet achieved widespread adoption.

One of the main advertised advantages of EPICS 7 is the new PV Access protocol (PVA) which is more efficient at transferring data, especially when it comes to larger structures, such as arrays. Because of this, one of the frontrunners of the V4 movement is the areaDetector module. areaDetector requires transferring a large amount of data which represents the output of a myriad of detector types that it supports and so profits from PVA’s bandwidth efficiency.

The PVA protocol was developed to transfer structured data with little overhead. These structures are assembled out of different types of fields and are created as classes in either C++ or Java (as bindings exist for both). Structures can be of a completely custom configuration or they can be of a normative type. Custom data structures provide us with the ability to define arbitrary structures for complex data sets, while normative types are standardized structures with defined mandatory and optional fields. This makes them similar to DBRecords used in the IOC databases, where one of the main advantages of EPICS’ DBRecords was their inherent standardized fields which allowed different software to exchange data. Normative types are a similar solution for PVRecords.

Example of a normative type (NTScalar) structure

Besides the usual PVRecords, EPICS 7 also supports writing more complex microservices which make use of an RPC-like functionality. Also, databases containing PVRecords can run completely standalone or inside an IOC. If sharing of existing V3 DBRecords is needed, the qsrv software can be used. qsrv runs inside an IOC and provides access to those records via PVA. By using qsrv, current IOC databases can be ported to use PVA with ease.

All possible options of using the new PVA functionality
In my experience, getting started with the PVA part of EPICS 7 is a bit trickier then it was to start with EPICS V3.

While V3 has plenty of presentations, examples and uses associated with it, the documentation regarding the PVA functionality of EPICS 7 is still somewhat fragmented. Since most of it belongs to the V4 project, it can be confusing to the newcomer.

What is currently available with regards to the documentation is the developers guide on the EPICS V4 web site [1] (which was updated in December 2017 with the release of EPICS 7) and also C++ and Java examples available on GitHub. The examples demonstrate the usage of the new records and how to use them to create databases, RPC services and clients. With the recent release of EPICS 7, the documentation should soon get more concise and friendlier to the developer.

With regards to software currently supporting the PV Access protocol, there are several noteworthy mentions:

  • CS-Studio supports accessing records via PV Access by using the “pva://” prefix
  • MASAR, a tool for saving, archiving and restoring system state, uses PV Access for snapshot distribution
  • Channel Finder, a directory service for PV name lookup and supports PV Access

Experimental Physics and Industrial Control System (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. EPICS7 is, as all previous EPICS releases developed by the world-wide EPICS community. 
Cosylab has played an important role in EPICS development and integration projects since 2002, and also significantly contributes to EPICS7 development, especially in the area of the pvAccess protocol design and development.

Interview with Marty Kramer, Lead Developer of EPICS

Don’t miss the next story!


About the Author

Gregor Gregorič’s main expertise is low-level C and C++ development. He joined Cosylab in November 2017, with his first project being the integration of a serial device into EPICS 7 using PVA and asyn. He currently lives in California, where he is working on EPICS development as part of the Cosylab USA team at the SLAC National Accelerator Laboratory. In his free time, he enjoys quiet evenings, reading about science and space technologies and watching quality TV series.


Do you want to learn more about this subject? Please let us know in the comments below!


Article References

[1] https://epics-controls.org/