synApps 6.4
Introduction
synApps is a collection of EPICS software intended to support most of the common requirements of an x-ray laboratory or synchrotron-radiation beamline. Because it is EPICS software, synApps is extensible by developers and end users, to support new devices and experimental techniques. This extensibility frees synApps to focus mostly on general-purpose capabilities and infrastructure, from which application-specific software can be built or assembled.
Thus, for example, synApps provides support for motors, scalers, and scans, but it does not tie those items together into an immediately executable scan (of specific motors, to acquire specific scaler channels, for a specific dwell time, etc.). The user does this at run time (or a knowledgeable user can provide a fully specified scan, and give the novice user a button to start it).
Similarly, synApps provides support for ADC’s and PID loops, but somebody has to tell the PID software what feedback value to read, what conditioning function to run it through, what PID parameters to use, and what actuator to drive. By default, all of these choices can be made at top level, by the end user. Or, a knowledgeable user can provide a fully specified PID loop, and make it available to a novice user through a simplified or otherwise customized interface. The techniques and tools used to accomplish this are essentially the same as those a user would have applied at run time, so the packaged solution can be prototyped and tested at run time.
synApps is organized into modules, whose structure is based on the example directory tree produced by the EPICS application, makeBaseApp.pl, typically with two additional directories: a documentation directory, and a display-file directory. synApps modules typically contain source code, EPICS databases and database-definition files, autosave-request files, client scripts, display files, libraries and executables, and documentation.
Getting Started:
- Deploying synApps – How to obtain and build synApps
- Configuring an IOC – Setting up and running an IOC with synApps
- Extending synApps – From run-time programming to module development
- Utils Directory – Utility scripts and tools
- Release Notes – Version history
Most synApps modules are intended primarily to export support to other modules. Some synApps modules produce bootable software, in addition to support software, but in most cases, this bootable software is primarily for testing, and for demonstrating how the support software can be used. The support exported by a module is of the following types, with example names and locations from the calc module:
- A database-definition file, in
calc/dbd:calcSupport.dbd - A linked library, in
calc/lib/<arch>:libcalc - Header files, in
calc/include:transformRecord.h - Database files and associated autosave-request files, in
calc/calcApp/Db:userTransforms10.db,userTransforms10_settings.req - Display files, in
calc/calcApp/op/adl,calc/calcApp/op/ui, andcalc/calcApp/op/opi:userTransforms10.adl,userTransforms10.ui,userTransforms10.opi
One synApps module, the xxx module, is different: it doesn’t export anything. It imports support from other modules, and produces bootable software to support an EPICS IOC. The xxx module is documentation in runnable form, and also a template from which a synApps application can be constructed. xxx is not comprehensive: it doesn’t apply all of synApps; it’s usually a little behind the rest of synApps; it focuses more on VME crates than on other kinds of IOCs; and it’s a compromise between what is most widely used and what is most likely to build and run out of the box.
*If you haven’t run into the term ‘IOC’ yet, two things:
- IOC stands for Input/Output Controller. Initially, this was a VME crate with a processor running EPICS under the VxWorks operating system, but beginning with EPICS 3.14, an EPICS IOC can also be a set of tasks on a workstation running Linux, Windows, Cygwin, Solaris, RTEMS, Mac OS, and, no doubt, other operating systems.
- The EPICS Application Developer’s Guide is an essential reference for anyone planning to develop or deploy EPICS software. While you won’t need to read the guide to build or run synApps, you will need it to understand what you’ve done, to diagnose problems, and to extend synApps in any significant way.
Contents
Here’s a list of the modules and directories in synApps:
| Module/directory | description |
|---|---|
| alive | Support for collecting, maintaining, and displaying status information about a collection of EPICS IOCs. |
| areaDetector ADcore ADSupport ADSimDetector | Support for cameras and other 2D detectors. areaDetector consists of some core modules, and many detector-specific modules; synApps contains only the top-level directory, areaDetector, and the modules ADCore, ADSupport, and ADSimDetector. See areaDetector for more information |
| autosave | Support for saving software parameters at run time, and restoring them during the next reboot. Autosave also provides a way to manage collections of PV values at runtime (configMenu), and a way to initialize array PV’s at boot time. |
| busy | The busy record, which allows developers more ways to indicate when an operation is complete. |
| calc | Run-time expression evaluation, derived from the calcout record in EPICS base, and extended to operate on strings, arrays, and to implement coupled expressions. |
| caputRecorder | Support for recording a series of caputs as a python function, and replaying the series. |
| camac | Support for CAMAC hardware. |
| configure | Build files |
| dac128V | Support for an IndustryPack DAC module. |
| delaygen | Support for delay generators, including the SRS DG645, Colby Instruments PDL100A, and Gigabaudics PADL3. |
| docs | Documentation |
| dxp | Support for X-Ray Instrumentation Associates’s DXP digital signal processor |
| dxpSITORO | Support for XIA SITORO based FalconX spectrometers |
| ether_ip | Support for communication with Allen Bradley PLCs via EtherNet/IP |
| galil-3 | Support for Galil motor controllers |
| ip | Support for various serial, and other message-based, devices. |
| ip330 | Support for an IndustryPack ADC module |
| ipUnidig | Support for an IndustryPack digital I/O module |
| labjack | Support for LabJack I/O modules |
| love | Support for Love controllers |
| lua | Support for Lua scripting language features |
| mca | Support for multichannel analyzers and multichannel scalers. |
| measComp | Support for USB I/O modules from Measurement Computing |
| modbus | Support for ModBus-protocol devices over TCP, serial RTU, and serial ASCII links |
| motor | Support for motors |
| optics | Support for optical tables, monochromators, slits, etc. |
| quadEM | Support for an APS-developed 4-channel electrometer |
| scaler | Support for scaler bank hardware. |
| softGlue | Support for user-programmed “wiring” of custom FPGA content loaded into an Acromag IP-EP201 module. |
| softGlueZynq | Support for user-programmed “wiring” of custom FPGA content loaded into a Xilinx Zynq board. |
| sscan | Support for scans (programmed control and data acquisition). |
| std | Miscellaneous EPICS support, including the epid (extended PID), sseq (string sequence), and timestamp records; and pvHistory support. |
| stream | Dirk Zimoch’s StreamDevice for byte-stream based device communication (serial, TCP/IP, GPIB). |
| utils | Miscellaneous tools, including support for converting an application from one version of synApps to another; support for the MDA file format, written by the sscan module; and support for EPICS-application prototyping. |
| vac | Support for vacuum controllers |
| vme | Support for VME hardware |
| xspress3 | Support for Quantum Detectors Xpress3 Hardware |
| xxx | Sample user-application directory |
| Yokogawa_DAS | Support for the Yokogawa MW100 Digital Acquisition Unit. |
See the assemble_synApps configuration for a complete set of compatible module versions. This release of synApps is compatible with EPICS base 3.15 and 7.0, and the following EPICS modules, which are produced and maintained by other members of the EPICS collaboration. These modules are not part of synApps, but their maintainers have permitted us to distribute copies along with synApps:
| Module | description |
|---|---|
| allenBradley | for communicating with Allen Bradley PLC’s (ANL) |
| ipac | required for IndustryPack support (ANL) |
| asyn | required by many modules (ANL) |
| seq | for SNL programs in synApps source: https://github.com/epics-modules/sequencer |
| stream | configurable device support for message-based devices (PSI) source: https://github.com/paulscherrerinstitute/StreamDevice |
| devIocStats | IOC statistics, replaces vxStats (SLAC) source: https://github.com/epics-modules/iocStats |
Previous versions of synApps included and relied on the genSub, ccd, and pilatus modules. Beginning with EPICS 3.14.10, a replacement for the genSub record, called the aSub record, is included in base, and synApps has been modified to use it instead of the genSub record. The ccd and pilatus modules have been replaced by the areaDetector module.
For convenience, this distribution includes the modules listed above, in place and ready to build, with minor modifications to build files. A few of the modules have suffered more substantial modifications to fix problems, add display files, etc.
synApps includes software developed by the Beamline Controls & Data Acquisition, Software Services, and Accelerator Controls groups of the Advanced Photon Source (APS); by developers in APS Collaborative Access Teams – notably, Mark Rivers (CARS-CAT); and by developers in the EPICS collaboration outside of the APS – notably, those at the Diamond Light Source, the Berliner Elektronenspeicherring-Gesellschaft für Synchrotronstrahlung (BESSY), the Stanford Linear Accelerator Center (SLAC), the Swiss Light Source (SLS)/Paul Scherrer Institut (PSI), the National Synchrotron Light Source (NSLS), the Deutsches Elektronen Synchrotron (DESY), the Spallation Neutron Source (SNS), the Australian Light Source, and the Canadian Light Source.
Aside from EPICS databases, SNL (State Notation Language) programs, and the like, synApps contains the following code:
-
Record support in or distributed with synApps
Record Description ab* AllenBradley-module custom records alive Send IOC status to a central server. acalcout calcout record extended to handle array expressions asyn provide access to nearly all of the features of the asyn facility busy utility record: calls recGblFwdLink only when its VAL field is zero, allowing CA clients, and asyn drivers to participate in EPICS putNotify (ca_put_callback()) operations camac camac-module custom record digitel vac-module custom record epid Extended version of the PID record, previously in EPICS base. Intended for implementing feedback loops luascript Record with scriptable behavior mca support for multichannel analyzers, and some other array-valued detectors motor stepper and servo motors, “soft” motor scalcout calcout record extended to handle string expressions, links, and values scaler scaler bank sscan Replaces the scan record (Ned Arnold/APS) previously in EPICS base. This version uses a modified version of recDynLlib that supports dbNotify command completion. It uses ca_put_callback to do puts, instead of ca_put. scanparm scan parameters for use with the scan record sseq string-sequence record. This is a modified version of the seq record in base. This version can link to/from either string or numeric PVs, and it can use dbCaPutLinkCallback to wait for completion of the execution started by one link before going on to the next. swait replaces the wait record previously in EPICS base. This version uses a modified version of recDynLlib that supports dbNotify command completion. It uses ca_put_callback to do puts, instead of ca_put. table 6-degree-of-freedom optical table transform like an array of calc records, with output links vme generic vme record (Mark Rivers/APS/CARS-CAT) timestamp (written by Stephanie Allison/SLAC) Needed by the vxStats module, but apparently not available in a published module. vs vac-module custom record -
Other C code
- aCalcPostfix, aCalcPerform, sCalcPostfix, sCalcPerform – Support for run-time expression evaluation.
- recDynLink – Backward compatible extension of the dynamic-link software previously in EPICS base. (New code should probably use dbCaPutLinkCallback(), instead of recDynLink.)
-
Documentation
In addition to this top-level documentation, synApps modules have their own documentation directories. Documentation and release notes for individual modules can be found at epics-modules.github.io. The xxx module contains examples of how the software is imported, built, loaded, and run. The areaDetector and galil modules are documented on their own sites.
-
Miscellaneous
The synApps support/utils directory contains a variety of scripts, programs, etc., that some have found useful. See the utils directory page for details.
Comments and bug reports to Keenan Lang (klang@anl.gov).