A New Approach to Control Systems for Medium-Scale Accelerators
Masakatsu MUTOH and Yoshinobu SHIBASAKI
Laboratory of Nuclear ScienceTohoku University 1-2-1 Mikamine,Taihaku-ku, Sendai 982, JapanIsamu ABE
National Laboratory for High Energy Physics (KEK)
1-1 Oho, Tsukuba-shi, Ibaraki 305, JapanAn accelerator control system which uses an object oriented database has been designed. This control
system will be installed in a new accelerator, the STretcher-Booster ring (STB), being constructed atTohoku University. Furthermore, we plan to change the old control system of the Tohoku Universityelectron linear accelerator to this control system in the next stage. It should become the most suitable
control system for medium-scale accelerators on the grounds of both minimized construction cost andgood performance.

1. INTRODUCTION
The STB [1] has three operation modes: the first is the stretcher-ring mode, which converts a pulsed
beam from a 300 MeV electron linac to a continuous beam; the second is the booster-ring mode, which
will accelerate the beam up to 1.2 GeV and inject it into a new storage ring which will be built in a few
years time and the third is the storage-ring mode, which will store the beam at 1.2 GeV. The control
system has been designed so as to be suitable for these complex operation of the STB. The design goals
are to reduce the construction and development costs, to enhance the flexibility and extendibility and to
avoid becoming old-fashioned because of the fast innovation of computer technology. In order to achievethese goals, we have decided to employ the latest computer technologies: personal computers andProgrammable Logic Controllers (PLC), which are rapidly advancing in performance and object-oriented
programming technology.
A simple database system, which saves only the operation parameters, has been used in the linac controlsystem[2]. Since the accelerator will become a larger part of a more complex system, the establishmentof a more sophisticated control system is required. A powerful database therefore becomes of greatimportance. In the future, if this control system is to be adapted to the linac and other accelerators, it
should be done without any major modifications. Therefore we cannot afford to develop software that issuitable only for specific accelerators. Using an object-oriented database to enhance the flexibility andextensibility of the control system will provide a good solution to this problem.

2. OBJECT-ORIENTED DATABASE
In general, a database called "object-oriented" should have not only object-oriented programming
functions, such as the encapsulation of data and services (methods), a definition of class layers and an
inheritance from basic class, but should also have relational database functions, such as a guarantee ofdata integrity and process checking (rules, triggers and stored procedures). In order to construct an object

oriented database having the functions mentioned above together with the ability to respond quickly toquery messages, a combination of a Microsoft SQL server and interface programs using Open Database
Services (ODS) has been used. The structure of the database is shown in figure 1. The data contained in
the database are preset values for normal operation, actual operating values, scanning rates to collectdata, PID coefficients for loop controls, alarm
Magnetmessages, bit data from the beam monitors
and all other data needed to control theData
Device Current PLC Coeffi.
accelerator. These data must be treated byBend01:methods constructed from procedures stored
Q01
in a Structured Query Language (SQL). The
Method (Stored Procedure)
stored procedures set the operational
send
PLC
collect
parameters for each accelerator device
through the PLCs, collect the operational datafrom the PLCs and store the data to disk. The
Quadrupole Magnet
data and the stored procedures are put together Bending Magnet
into data tables in the database. One data table
Data
Data
Device Angle Radius Length
Device Bore Focus Length
is formed together with the data and the stored
Bend01
Q01
Q02
Bend02for each type of device. Common items::(voltage, current, coefficients, etc.) in theMethod (Stored Procedure)
Method (Stored Procedure)set ( , ,send , , , )set ( , ,send , , , )tables for each category are collected together
read ( , ,)read ( , ,)in tables which are placed in an upper layer.
The stored procedures in the lower layers canuse the data and stored procedures in theupper layer of the same category
corresponding to the inheritance in the objectVisual Works, etc.
oriented programming. If a new device isadded to the database, the data and storedFigure 1: The structure of the databaseprocedures which should be inserted into thedatabase are only different from that for otherdevices that have been entered in a few respects, and so it is a form of differential programming.
The distributed-database functions provided by the SQL server will become available further if theaccelerator is expanded.
We have completed the basic tests on the database, and have made sure that it will be possible tocommunicate between the client and the server within several tens of milliseconds.

3. SOFTWARE SYSTEMFigure 2 shows the software configuration. The control program consists of the object oriented database,based on the SQL server and application programs (Visual Works, Excel, Visual Basic, WWW sever,FINS, etc. ) which are commercially available. Visual Works is used as a Graphical User Interface (GUI)on the operator's consoles [3] and provides the SmallTalk language, convenient tools and a number of
useful class libraries for program development. Excel is used for the statistical display of logged records.
Visual Basic is used as a simple language for sequencing operations. The WWW server provides not only
real-time information concerning accelerator operation, but also provides help messages and on-line
manuals written in Japanese for the accelerator operators as well as to researchers through the campus
network. The Factory Interface Network Service (FINS, supplied by OMRON Co. ) is a communication
protocol between a personal computer and the PLC. The application programs are connected to the
database by means of the Open DataBase Connectivity (ODBC), ODS, or the Dynamic Link Library(DLL). The use of their application programs is of benefit to this control system: there are fewer program
bugs than are found in laboratory-designed ones, comprehensive manuals, the expectation of upgrading to
new versions in the future, and reductions of the development and maintenance loads. We have adopted
Microsoft WindowsNT for the personal computer operating system, because it has various importantfeatures: a multi-tasking system taking advantage
of 32 bit performance, good network connection
and an architecture following the client/servermodel.
Due to the speed of technical innovations, if
much effort is not taken to continuously upgrade
the control system, it will become technicallyobsolete within a few years. To cope with thisproblem, the personal computers in the system
will be replaced by new ones having a higher
performance every few years and the application
programs will be updated with new versions
provided by the software suppliers, or replacedby other similar applications having better
functions. Therefore, the control system will be
constantly maintained at the optimum condition.

Figure 2: The software configuration

4. PLCAn outline of the control system is shown in figure 3. A PLC has been adopted as a device driver and as
an interface between the computer and the accelerator, because the price is lower than that of theCAMAC and VME systems. It is capable of complex control of external devices with simple programsand various modules are available commercially. Recently, because the programming, process speed andnetwork environment of the PLC have improved remarkably, it has become possible to use it for
accelerator control [4], except for applications which handle a large quantity of data during a short period
Operator's Console

Database Server

Campus Network
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWWW Server

FDDI (100MHz)AAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVideoProcessor

Gateway

Video Switch
TV Camera

Beam Screen Monitor

Gateway

Ethernet (10MHz)
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAAA
AAA
AAAAAAAAAAAAAAAAAAAA
AAAAAAAA
AA
AAAA
AAAA
AAAA
AAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AA
PLC
PLC

AAA
AA
A
AAA
AA
AA
AAA
AA
AA
AAA
AA
AA
AA
AA AA
AA
A
AA
AA
AA
AA
AA
AA
AA
AA
AA
A
AA
AA
AA
AA
AA
AA
AA
AA AA
AA
AA
A
AA
AA
AA
AA
AA
AA
AA
AA AA
AA
AA
A
AA
AA
AA
AA
AA
AA
AA
A
AA
AA
A
AAAA
AA
AA
AA
AAAAA
AA

AA
AAA
AAAA
AAAAAAAAAAAA
AAA
AA
AAAAA
AAA
AAA
AA
AA
AAA
AA
AA
AAA
AA
AA
AAA
AA
AA AA
AA
AA
AA
AA
AA
AAA
AA
AA
AA
AA
AA
AA
AA
AA
AA
AAAA
AA
AAAAAAAAAAAA
AA
AA
AA
AA
AAA
AA
AA
AA
AA
AA
AA
AA
AA AAAAAA
AA
AAAAA
AA
AA
AA
AA
A
AA
AA
AA
AA
AA
AA
AA
AA AA
AA
AA
A
AA
A
A
A
AA
A
AA
AA
AA
AA
A
AA
AA
AA
AA
AA
AA
AA
A
AA
AAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAA
AA

Magnet System

RF System

AAAAAAA
AAAA
AAA
AAA
AA
AA
AAA
AA
AA
AA AAA
AAA
AA
AA
AA
AA
AAAAAAA
AAA
AAA
AA
AA
AA
AA
AA AAA
AA
A
AA
A
AA
AA
AA
AA
AAA
AAAAAAAAAAAAA
AAAAA
AAAA
AAAA
AAAA
AA AAAAAA

Vacuum System Monitor System

Figure 3: The configuration of the control systemof time.
In this control system, the PLCs will control various magnet systems, an RF system, a vacuum system, abeam-monitoring system, etc. The PLCs function as device drivers that set the operation parameters,monitor the operating condition, check the interlocks (main interlocks are hardwired) and act as a

feedback loop controller. The I/O modules used in this system include the following types of module:
ADC (12 bit, 8 channel), DAC (12 bit, 4 channel), digital input (16 bit, 4 channel), digital output (16 bit,4 channel) and GP-IB interface. The program executed in the PLC is developed in a Sequential Function
Chart (SFC) running on personal computers connected to the FDDI backbone network and it is stored in
the database server computer. When the system starts, the program is loaded into the PLCs with thecharacteristic data on the controlled devices. The PLCs are connected with a 10 MHz Ethernet using aUDP/IP protocol, and communicate with the database server through gateways (the personal computers)
for converting the transfer speeds and protocols.

5. PERSONAL COMPUTER
The performance of the personal computer has improved rapidly during the last few years. Especially in
the GUI environment. The appearance of new operating systems available for multi-tasking (OS/2,WindowsNT, etc.), network connection, programming languages and tools for application development,
memory and hard-disk capacity and low initial and running cost, makes the personal computer a better
choice than the workstation. In our system, personal computers will be used in the following roles:
database servers, operator consoles, image processors for digitizing and displaying video signals frombeam screen monitors, gateways and WWW servers. All of the personal computers will be IBM PC/ATcompatible.

6. CONCLUSIONS
Various basic tests on the database have been carried out and the control system is being constructed at
the test facility. Since the STB will start operation for nuclear experiments next autumn, this controlsystem must be completed by next summer at the latest.

REFERENCES
1.

Oyamada et al., "The Tohoku University Stretcher-Booster Ring", Proceedings of the 10thSymposium on Accelerator Science and Technology, Hitachinaka, Japan 1995

2.

Mutoh et al., "Improvement of the Control System for Linac and Pulse Beam Stretcher at Tohoku
University", Proceedings of the 7th Symposium on Accelerator Science and Technology, Osaka,
Japan 1989 p.240

3.

Mejuev I., Abe I. and Nakahara K., "Application of an Object-Oriented Analysis for the PF LinacControl System Development", Proceedings of the 20th Linear Accelerator Conference Osaka, Japan,
1995 p.212

4.

Shirakawa, I. Abe and K. Nakahara, "Feasibility Study of PLC in the PF Linac Control", ibid. p.218