NUCLEAR INSTRUMENTS & METHODS IN PHYSICS RESEARCH
Nuclear Instruments and Methods in Physics Research A 352 (1994) 427-429 North-Holland
A simple generic software tool kit for distributed controls applications V. Mertens *, A. Aimar, E. Carlier European Organization for Nuclear Research (CERN) - SL Division, CH-1211 Genet:a 23, Switzerland
A set of services has been developed forming the core of a simple generic tool kit for distributed controls applications. The system is based on the Entity-Relationship model and the ADAMO data management system. It allows data sharing and synchronization between various processes acquiring data, running control and supervision algorithms, detecting faults, allowing user interaction and interfacing to external applications. The system is highly parametrizable, thus flexible and re-usable. It is being used at CERN in several applications for the control, monitoring, and diagnostics of accelerator components.
1. Introduction
A software package has been developed which forms the core of a simple generic software tool kit for distributed applications in the area of accelerator controls or other domains. This contribution concludes a presentation given at the I C A L E P C S ' 9 1 [1] when the system was under development. The tool kit is now fully operational and is being used at C E R N for the control, supervision and diagnostics of several accelerator components at the Super Proton Synchrotron SPS and the large e + e - s t o r a g e ring LEP. In the following the motivation for this development will be reviewed, followed by a description of the concept. Finally, the use of the tool kit in present applications will be briefly addressed.
2. Motivation for the tool kit approach
When development began the situation was characterized, at least in the area for which the tool kit was intended, by a number of adverse factors, which included a rather large spread of programs and development environments, each requiring particular maintenance, a growing amount of equipment to control and supervise, an increasing degree of sophistication in the use of this equipment requiring more thorough performance analysis and improved modification time, all coinciding with an unfavourable manpower situation. It was, however, obvious that much common functionality existed between different applications, and that the setup and maintenance of new applications, and the satisfaction of new requirements, would be-
* Corresponding author.
come much easier once code and data became separated and organized. After such an organization any modifications would be made in one place only. Various tasks, such as data acquisition or running control algorithms, could then be treated separately, thereby allowing effort to be concentrated on individual problems and improving the understandability of the overall application. This organization should provide only one set of programs, written in a conventional language, which is able to deal with all upcoming requirements. Application specific functionality is provided through configuration tables or "meta language" files. Such a set of programs can then be used repeatedly, thus forming a generic software tool kit. To preserve the manpower investment this tool kit should be portable to new platforms without difficulty. This type of approach tends to demand extensive computer resource. Fortunately issues such as CPU power, memory size and network bandwidth are, nowadays, not stringent constraints. The prospective gains include shorter development times, structured and transparent applications, and a clear relief in manpower necessities, in particular if the tool kit becomes accessible to non-software specialists.
3. Concept of the tool kit
The main ingredient of the tool kit is a shared data base, accompanied by a server program handling input and output access. Inside, data are organised by fields containing an identifier (a "tag"), associated with its value, and optionally, comments and other parameters. There are different client programs which may connect to the data base server, each dealing with a
0168-9002/94/$07.00 © 1994 - Elsevier Scierlce B.V. All rights reserved SSDI 0168-9002(94)00067 -H
VII. SOFTWARE ENGINEERING
428
V. Mertens et al, /NucL Instr. and Meth. in Phys. Res. A 352 (1994) 427-429
different equipment control aspect, such as acquiring data, sending commands, interactive user access or handling output to log files. The configuration defining the application-specific behaviour of each module is provided by flat "start-up" files, used to establish the desired relations in the data base. Several data bases running on different computers can be interlinked using a special client module thus appearing as a unique data base. This allows several distributed sub-systems work in parallel, largely independently, and to exchange only the necessary minimum of data with any hierarchically higher level. Another module allows the supervision and control of the equipment through checks and coordinated actions, with desired behaviour specified in a file containing "rules" written in a "controls meta language". This language provides powerful control structures (e.g. IFTHEN-ELSE, EXECUTE SHELL), but is still simple enough to code the required algorithms in a concise and rather self-documenting fashion. It is noteworthy that this mechanism is currently used to supervise all tool kit applications themselves. A more thorough discussion of this facility can be found in [2]. The interface to the global control system is provided in form of an access library by which other programs may read or change the contents of the data base. If necessary this library can easily be used to realize new client programs, such as synoptic user interfaces based on X Windows. The interface to the general SPS and LEP alarm system [3] has been implemented this way. Besides these primary modules, further tools exist for the maintenance of the data base and the proper managing of client programs. One of the maxims during the development was to raise the system wherever possible from existing building blocks. As an example, the data base was designed using the ADAMO data management system [4]. In addition the CASE tool "StP" [5] has been applied, making use of the ADAMO interface to the Picture Editor of StP. A more thorough discussion of the underlying structures and their choice has already been given in [1]. To simplify any further porting all tool kit software has been written in C. At present the tool kit is running under ULTRIX, H P / U X and LynxOS. For straightforward embedding into the present S P S / L E P environment the current tool kit version uses the Remote Procedure Call mechanism developed at CERN [6] for data exchange between the modules and the data base server. Equipment access uses a new generalized method discussed in [7]. Due to the modular structure, the tool kit could be adapted rapidly to different environments, even outside of the accelerator domain.
4. Present applications Until now, the tool kit has been applied to the control, supervision, and diagnostics of the LEP Trim Pretzel separators and the LEP beam dump. Both sets of equipment and their control systems were commissioned recently and are described in [8,9] where also details about the use of the tool kit can be found. Control of the extraction kicker system for the new SPS neutrino line is also being set up in this way. In several other SPS and LEP systems the tool kit is used for diagnostics purposes.
5. Further information More detailed information about the tool kit can be obtained from the authors, preferably by E-mail (e.g. to
[email protected]). There is also "on-line" information including examples of files, publically accessible through the World-Wide Web ("W3") information access system [10], specifying from the browser the Uniform Resource Locator (URL) " h t t p : / / dxbt00.cern.ch/". Comprehensive information about ADAMO can be found by specifying " h t t p : / / w w w l . c e r n . c h / A d a m o / A D A M O _ ENTRY.html".
Acknowledgements Thanks go to the DEC Joint Project Office at CERN for their support during the initial phase of the project. The help received from Steve Fisher during the installation and exploitation of ADAMO on the different platforms is gratefully acknowledged. Members of the CERN-SL Controls Group helped during thc embedding of the tool kit into the overall controls environment; the pleasant collaboration during interfacing with other services is greatly appreciated. Brennan Goddard helped considerably to debug and improve the tool kit through his patient and systematic testing and his constructive remarks.
References [1] A. Aimar, E. Carlier and V. Mertens, Proc. Int. Conf. on Accelerator and Large Experimental Physics Control Systems, Tsukuba, Japan, 1991, p. 475, and CERN SL/91-41 (DI). [2] A. Aimar, E. Carlier and V. Mertens, to be presented at the Workshop on Workstations and Software Tools for Automatic Control, Prague, Czech Republic, 1993. [3] C.A. Cameron, User Interaction with the CERN Alarm System, CERN SL/93-48 (CO). [4] For an introduction see: M.G. Green, The ADAMO
1~ Mertens et al. /Nucl. Instr. and Meth. in Phys. Res. A 352 (1994) 427-429
[5]
[6]
[7]
[8]
Data System, An Introduction for Particle Physicists, Royal Holloway and Bedford New College, UK, RHBNC 89-01 and C E R N / D D / U S / 1 3 1 . Software Through Pictures, Interactive Development Environments, 595 Market Street, San Francicso, CA 94105, USA. P.S. Anderssen, V. Frammery, G. Morpurgo, User Guide to the Network Compiler/Remote Procedure Call, CERN, LEP Controls Note 97, 1989. P. Charrue, Accessing Equipment in the SPS-LEP Controls Infrastructure: The "SL-Equip Package", CERN SL/93-86 (CO). V. Mertens et al., The New Control System for the LEP
429
Pretzel Separators, these Proceedings (ICALEPCS '93, Berlin, Germany, 1993), Nucl. Instr. and Meth. A 352 (1994) 144. [9] E. Carlier et al., The Control System for the LEP Beam Dump, these Proceedings (ICALEPCS '93, Berlin, Germany, 1993), Nucl. Instr. and Meth. A 173. [lO] For an introduction see: T.J. Berners-Lee, R. Cailliau, J.-F. Groff and B. Pollermann, World-Wide Web: The Information Universe, Electronic Networking: Research, Applications and Policy, vo[. 2, no. 1, Spring 1992, (Meckler Publishing, Westport, CT, USA, 1992) pp. 52, or the PostScript files i n / p u b / w w w / d o c on info.cern.ch, accessible via anonymous FTP.
VII. SOFTWARE ENGINEERING