EPICS Application Development At The Canadian Light Source Glen Wright
Tools Commonly Used EPICS Base R EDM – Extensible Display Manager SNL – State Notation Language Compiler MKS – System Integrity Matlab – high-level scripting and user interfaces
Other Tools/Features Installed VDCT MEDM/DM2K Epics Gateway Channel Archiver ROOT QT SYNAPPS (collection of beamline software)
EPICS Directory Layout $EPICS_BASE contains standard executables, include files, and libraries $EPICS_EXTENSIONS contains optional executables, include files, and libraries $EPICS_MODULES contains SNL compiler and SYNAPPS $EPICS_LOCAL contains local executables, include files, and libraries
EPICS Applications Install Layout /iocApps (srv-unix:/export/iocApps) contains applications that run on Linux systems /export/tftpboot ( css :/export/tftpboot ) contains applications that run on EROCs Directory structure similar to Application Development structure /export/tftpboot has a development mirror; /iocApps doesn’t but should.
Application Directory Layout The script ‘makeBaseApp.pl’ generates a standard directory tree structure Multiple applications can share some of the directory structure Used to define the “.dbd”, “.db”, “st.cmd” and executable files for an application Should also have necessary installation scripts in place
Application Directory Layout HXMA bin lib db dbd configure iocBoot Makefile AX101App HSCApp HXMAApp PicoApp TMApp
Application Directory Layout HXMAApp Makefile BLsrc src vmeSrc Db Db-ID06 Db-ID1018 vmeDb
Application Directory Layout src Makefile O.Common O.linux-x86 O.RTEMS-gen68360 hxmaInclude.dbd main.cc monoCalibrate.st reboot.cc reboot.dbd registerCommands.cpp
Application Directory Layout Db-ID06 Makefile O.Common O.linux-x86 O.RTEMS-gen68360 IOCconfiguration reboot.db supportIOC db
Application Types Unique Device Only one instance of the software will run in support of a single device (e.g. timing system) All source is developed within the application directory itself Therefore, the Record Names, DB files, and startup files can be customized for a single instance SNL can use explicit record names
Application Types Many Instances of a Device The software will run on a number of different systems (e.g. VME motor controllers) The software support should be developed as a library Db files should be generated from common templates
Applications Available Most common Beamline devices are in place: cls and VME 58 motor controls, ion pump controllers, Kiethley picoAmmeters, Stanford Research 570’s, PLC variables, …
Higher-level Applications PV database Data Acquisition (Scanning and recording) RF OPI and Timing OPI
Further Details Read about Makefile setup for source and database files when building a device application (EPICS Application Developer’s Guide) Read about specific record types and capabilities (EPICS Record Reference Manual) Read about Channel Access calls (Channel Access Reference Manual)