Applications, K.Furukawa, Jan.17.2002. 1 Application Software In this section application software in the control system is described from several aspects. 1.1 Application on IOC Application software on an IOC (I/O controller) may be developed using these facilities. (a) Linked records (b) State Notation Language (SNL or Sequencer) (c) Writing an application with C/C++ language (d) Writing a new record (b) and (c) may be developed at the client side as well, while it is preferable in performances to develop at the IOC side since local records can be accessed without network intervention. It may also access remote records via the channel access, if it is necessary. (a) is a basic EPICS programming technique to describe a procedure without writing a code. A group of records are designed to behave properly when a record changes, when a record is accessed, etc. One may simply fill the fields of EPICS database to describe the behavior. (b) may be used to write a more complicated procedure. Since SNL is designed to describe event-driven sequences, it is adequate to write most control procedures. If it is necessary, one may write (c). (d) may be used to describe a behavior of complicated accelerator equipment. For a complicated system, a lot of records may have to be used and much memory can be consumed. In order to simplify the database and to reduce the memory consumption, it is sometimes better to write a new records. Examples of (a) and (b) can be found in many EPICS documents. Examples of (c) and (d) should be provided by the controls group. 1.2 Application on Client Application software at the client side (OPI) can be developed in many different ways. Many kinds of software interfaces are provided in EPICS community. Any software environments which can use the channel access library routines may be used to develop application software. (For performance reasons, it is preferable to utilize the monitor functionality of the channel access.) Since it is sometimes necessary to reboot an IOC to develop application software at the IOC side, it may be easier to write software at the client side for a rapid development. If the software is stabilized, it may be transferred to the IOC side for the better performance. These are examples of software environments at client side. (a) EPICS Display Manager (EDM, MEDM, DM2K, etc) (b) EPICS applications (Archiver, Alarm-handler, Strip-chart, etc) (c) General scripting languages (Python/Tk, Tcl/Tk, etc.) (d) Scripting environment for accelerator operation (SADscript/Tk, SDDS, etc) (e) State Notation Language (d) Compiler languages (C/C++, Java, Fortran, etc) (a) is used to display EPICS records. If this and (a) of 1.1 are combined, one may build a simple application without writing any codes. (That may correspond to a simple SCADA (Supervisory Control and Data Acquisition) system.) Although the formats of description files (adl) between display managers are mostly interchangeable, we should concentrate on a display manager in order to avoid a mixed environment. Since EDM can handle simple scripts, we may employ EDM. (b) can be utilized in many applications. Since many control systems have the same requirements, these special-purpose applications may have features which meet our requirements. If they meet most of our needs, we should utilize them as much as possible and improve them instead of writing ones since they save our human resources. (c) may be used in many applications since it is suitable to develop software rapidly. Common library routines should be provided by the controls group in order to facilitate the same environment at the operators' console. If possible, we should concentrate on one language. In order to choose a language, the items described in the next section should be considered. (d) is necessary to operate on beams. It would be used heavily during the commissioning phase. In KEKB SADscript has been used by the commissioning group, and more than half of the operation panels have been built with SADscript. It was often used even as a general scripting language since it covers most of features in the next section. Some of other laboratories use a combination of SDDS and Tcl/Tk. At least those two environment should be prepared for the commissioning. Other software may be built using (d) of 1.3. (e) may enable the rapid development of sequence procedures on client computers. They can be eventually transferred on to IOC's. (f) may be used to replace a part of (c) in order to improve the performance. The on-memory processing speed of (f) can be 10-times faster than that of (c). In order to utilize some software environment like MAD etc. one may have to use (f). Java is quite interesting to make the application be shared between multi-platform and to adopt technologies developed for internet/intranet. 1.3 Features of Application Development Environment (ADE) In order to develope software for the accelerator operation these features should be covered. (a) EPICS channel access capability (b) graphical user interface (c) 2-dimensional (and 3-dimensional) data visualization (d) interface to other software (e) interface to relational database (f) object oriented programming and other software engineering support (g) data reduction/analysis facilities . data modelling (data fitting) . Fourier and other data transformation (h) accelerator design facilities . beam line geometry management . lattice designing . beam particle tracking . optics matching (i) multi-platform (POSIX/X11 and Win32) environment Since one environment cannot cover all the features, a few development environments should be prepared. SADscript/Tk will be included as it may cover most of the items above. Scripting environments which are considered beside SADscript/Tk are Python/Tk, Tcl/Tk, and Ruby/Tk. Accelerator design codes which may be employed beside SAD are o MAD, Parmila, Trace-3D, Transport, etc. o Mafia, HFSS, Opera, Superfish, etc. They may be used mostly off-line. In order to utilize them in operation some scripting interface should be developed. 1.4 Basic Operational Applications Beside specific applications, these basic applications should be provided for the commissioning. (a) Parameter displays for each equipment group (b) Parameter displays for beam operators (c) Machine status displays (d) Beam characteristic displays (e) Archiver (g) Archive viewer (h) Alarm handler/logger (i) Data-set save/restore/compare (j) General feedback facility (k) Active and passive correlation plot (l) Error logger (m) Application launcher (n) Application window management (o) EPICS management . IOC console management . channel save/restore Application software developed in the EPICS community can be used for some of those. They have to be evaluated whether they meet the requirements in this project. Some others have to be developed before the commissioning.