New High Level Application Software for the Control of the SPS - LEP BeamTransfer Lines
F. Chevrier, G. Crockford, A. Hilaire, Y. Maumary, C. Niquille, V. Paris, P. Ribeiro, G. de Rijk,
G. Smith
CERN SL Division, CH-1211 Geneva 23, Switzerland
New high level application software is being developed for the control of the SPS and LEP Transfer Lines. This paper briefly
describes the model for the operation of these Transfer Lines, which is largely based on previous experience gained during thedevelopment and upgrades of the SPS and LEP control systems. The software system is then presented, followed by a descriptionof the high level applications for the control room operators. Tools and methods used for the design and implementation of the system are mentioned.

1. INTRODUCTION
Transfer Lines
The Transfer Lines include all the equipment (dipole and quadrupole magnets, beam instrumentation, etc.) used totransfer the beams of particles into the Super Proton Synchrotron (SPS), and from the SPS onto targets or into theLarge Electron Positron collider (LEP). They are divided into Transfer Zones, which join at intersections.
In order to run many experiments simultaneously, the SPS is used as a hadron accelerator and lepton injector for
LEP in a time-sharing fashion. Because of the layout of the accelerator complex, some Transfer Zones are used for
different types of particles (protons, electrons, positrons, Lead ions), in both directions, implying different settings forthe steering or beam instrumentation. These settings are therefore functions of time, synchronised on the SPS Supercycle.
SPS Supercycle
The SPS accelerator is controlled in a so-called multicycling mode: at any one time the machine runs a repetitive
sequence of beam injection(s), acceleration and extraction(s) of various particles. The whole repetitive sequence iscalled Supercycle and is composed of a number of elementary cycles, each of them divided into a beam segment anda preparation segment. From a functional point of view, each elementary cycle in a Supercycle can be considered as aseparate accelerator.
The selection of a given segment to be worked on is done using a graphical representation of the Supercycle, themain bending magnets current.

2. TRANSFER LINES SOFTWARE
The analysis and design models for the operation of the Transfer Lines were largely based on previous work done
for the SPS and LEP control systems [1,2]. See also [3].
The Transfer Lines software is organised around 3 ORACLE databases. The Offline database contains a fulldescription of the machine in terms of hardware, as well as optics data. It serves as a source for the On-line Control
database, which contains all the settings functions, hardware descriptions, hardware addresses and control parameters. The settings are organised into a hierarchy which allows control in terms of physics parameters, hardware magnitude or equipment settings, e.g. injection angle, dipole magnet strength or dipole current. A simplified data modelof the On-line Control database is shown in Fig. 1. The system provides a reliable way of storing and retrieving settings, recording with a time-stamp all adjustments (trims) made, as well as providing a means of stepping backthrough these changes. All measurements are done by equipment Black Boxes, via the Measurement database. The
latter contains measurement tables which are overwritten every time a new measurement is made and history tables
filled from the measurement tables according to a trigger mechanism which can fire on different events (e.g. everymeasurement, on demand, etc.).
Taking into account the specific requirements for the operation of the Transfer Lines, the system was designed andstructured into 5 subsystems, to be implemented as distinct applications for the control room. Fig. 2 represents a simplified model of the system. These applications exist and currently contain the minimum required functionality foroperation. Another application is foreseen for the settings generation, which is currently being done manually (SQLFig. 1. Simplified Entity-Relationship Diagram for the On-line Control database.

Fig. 2. Simplified model of the Transfer Lines software.

scripts).

3. THE APPLICATIONS
Throughout the design and implementation phases, emphasis was put on producing “data driven” software. To
achieve this, the complete description of the Transfer Lines and their operation, in terms of which equipment is being
used as well as optics data, is contained in the On-line Control database, allowing the control and management of alarge amount of different equipment in a generic way. Furthermore, it gives the required flexibility which is especially
important during machine development periods, when different optics and equipment configurations are often used.
To improve reliability and future maintenance, effort was also spent to produce modular software. The Graphical
User Interfaces (GUIs) are written in X/Motif and were developed using the XUIMS [4] tool which helped to enforce
modularity as well as uniformity in the “look and feel” through the use of templates. This uniformity is an important
requirement for control room applications to ease the running of the accelerators and to minimize operator error.
Several other software packages, developed at CERN specifically for the operation environment, were also used[5].
The functionality of the subsystems is outlined briefly below.
Drive Hardware
This is a user-friendly facility to handle communications with the equipment in a generic way. It allows one toread settings from the database and load them into the hardware (low level equipment controllers), query hardware
status, as well as perform other commands (e.g. initialisation, on, off, etc.). These operations can be performed on asingle piece of equipment, a selected group, or even a whole Transfer Zone.
Measurements
The Measurements facility provides a standard interface to control the acquisition and display of all measurements of the beam itself or of the hardware. Measurements can be stored in the Measurement database for post run
analysis and eventually on-line correlations. Graphical display is handled by the XPLORE package, which uses thecommercial product XRT/graph (KL Group Inc.).
Trim
This application allows adjustments of the settings for a given Particle (beam) Transfer, or to revert to a previousstate. The trimming can be done at 3 different levels: physics parameter (e.g. injection angle or position), hardwaremagnitude (e.g. kick strength in radians) or hardware (e.g. power converter current). It adjusts the value of the plateau
corresponding to that Particle Transfer, in the parameter function. A full history of all trims is available for viewing,with the option of restoring any previous state, for a single piece of hardware or for all the equipment of a given type,for a given Particle Transfer.
Expert Trim
The parameter functions are described by a series of value-time coordinates, two consecutive points constituting avector. The Expert Trim application allows a complete editing of these functions, at any level. It contains a graphicalfunction editor including many specialized edit options (e.g. adding, removing or changing the value of a point, vertical shift of one or more vectors, etc.) that can be used in two modes: “click and drag” the mouse, or with keyboard
input. As for the Trim facility, a full history of all trims is available, with restore options.
Steering
The Steering application allows correction of the beam trajectory of a beam transfer. It performs measurements ofthe trajectory, launches a correction algorithm to calculate adjustments and then sends them to the appropriate corrector magnets. The system allows for easy addition of new methods and several correction algorithms will be available
in the future. The first method implemented is a manual adjustment of corrector magnet strength for designated detector-corrector pairs.

4. CONCLUSIONS AND FUTURE PLANS
At present, one Transfer Line (TT10, used for all beam transfers of protons, positrons and Lead ions from CPS toSPS) is operated with the new system. This implementation is used to fine-tune the GUIs to the operators’ requirements. The first conclusions that can be drawn from this experience is the need for simple interfaces for the frequentroutine manipulations and the hiding of the rarely used, specialised functionality. This significantly contributes tofaster and more reliable operation. Also, the “data driven” software design and implementation has proven to be avery worthwhile investment: many modifications in the control were possible without any modifications to the code.
The full implementation of all transfers, including injection and extraction into and out of the SPS, is planned for1996. During the second half of that year, all special equipment (e.g. kicker magnets, electrostatic septa, steppingmotor equipment) will be brought into the system as well. In parallel, higher level correction algorithms for the Steering will be implemented.
Selections of Zones or equipment are currently done through lists, which will be doubled by synoptic. Currently,
only a global view of the Transfer Lines in the accelerator complex exists.

REFERENCES[1] A. Ogle et al., Experience with workstations for accelerator control at the CERN SPS, NIM A 293 (1990).
[2] R. Bailey et al., Performance of the high level application software during LEP operation, NIM A 352 (1994).
[3] M. Lamont, What constitutes a good control system for operations, these Proceedings (ICALEPCS’95, Chicago, USA).
[4] P. Ninin, M. Vanden Eynden, XUIMS - The X-Window User Interface Management System, these Proceedings(ICALEPCS’95, Chicago, USA).
[5] M. Vanden Eynden, Display package XPLORE, CERN - SL/Note in preparation,
E. Hatziangeli et al., Measurement Service MSRV, CERN - SL/Note 93-38 (CO),M. Vanden Eynden, Software Synchronisation Mechanism SSM, CERN - SL/Note 93-71 (CO),P. Charrue et al., Equipment Access SL-EQUIP / RPC, CERN - SL/Note 93-86 (CO).