ACCELERATOR CONTROLS IN KEKB LINAC COMMISSIONING
K. Furukawa , N. Kamikubota, T. Suwada and T. UranoHigh Energy Accelerator Research Organization (KEK)
Oho 1-1, Tsukuba, Ibaraki, 305-0801, Japan
Abstract

to build layered equipment services utilizing a homemade
remote procedure call (RPC) scheme.

In the commissioning of KEKB
8GeV /
3.5GeVlinac the accelerator control system was much improved,since reliable operation of the linac is indispensable toachieve the higher luminosity at the ring.
Many controllers were installed to manage newly installed accelerator equipment and beam instrumentation.
Parts of the optical FDDI/Ethernet network system and themain computer system were made redundant as well as
control services in order to provide reliable operation.
The database is made of simple files and homemade hashroutines. The source files of the database are shared between the control computers and office computers to easethe update. Control software is based on RPC over the network. Although many different kinds of controllers are utilized, RPC servers hide the differences.
New operator interface panels were introduced for the XWindow environment to be used in both the linac local control room and the KEKB main control room. They were developed with script languages for rapid modifications during the commissioning, which included Tcl/Tk, SADscriptand others. The system serves stable linac operation, andmany application programs are being developed on top ofit.
1







INTRODUCTION

The KEK / linac has been reinforced to inject full energy beams to the KEKB asymmetric B-factory with 8GeV
and 3.5GeV[1].
Although the control-system architecture didn’t change,
the number of operation points became several-times
larger, and now four beam operation modes (KEKB,, PFand AR-PF ) must be switched with very different beam and equipment parameters [2, 3].


2





LINAC LAYERED CONTROL SYSTEMAND NETWORKThe design of the linac control system was rejuvenated in
1993 [4, 5]. In the new control system, international and defacto standards, such as Unix, VME and TCP/IP, were employed, while many of the old local device controllers hadto be maintained. The control software was rewritten so ase-mail: kazuro.furukawa@kek.jp

2.1

Field controls

The computer network for controls comprises an FDDI andabout 50 Ethernet network segments, which are isolated
from the laboratory-wide network by a firewall. Although
the FDDI and Ethernet networks around the main control
room use twisted-pair cables, the connections to local field
controllers are now based on fiber-optic cables (10Base-FLEthernet) in order to eliminate noise from the high-power
klystron modulators in pulsed operation. A star-like topology was employed to localize any problems and to easetrouble-shooting.
Currently, the number of 10Base-FL nodes is just above
200. They are connected with one of 33 10Base-FL
repeater stations, which are spread along the 600-meterlinac building, and then concentrated into FDDI-10BaseFL
switches at the main control room. While the 10Base-FL
connection between the field controllers and the repeater
stations are single, those between the repeater stations andthe central switches are made fault-tolerant by adopting
redundant switches and redundant transceivers, since any
problem at this level is severe.
For local device controllers, no standard was defined.
Once it was considered to have VME computers as standard device controllers. However, while we have many old
controllers which are already about 20 years old, every year
new technologies are revealed. Thus, from our experience,
it’s not practical to decide on a standard. Actually, it costs
much manpower to maintain a standard for 20 years.
Instead, we defined criteria, which require that each local device controller should at least speak the UDP protocol
and be diskless, if possible. If the controller is intelligent,
the UDP version of our RPC protocol is installed on it. Old
controllers are indirectly connected to the RPC network environment through VME’s.

2.2

Central-control architecture

Unix computers consist of a computer cluster and isolatedcomputers, which are also operated to be fault-tolerant.
They are mainly based on DEC Alpha architecture, and acluster software called True Cluster is installed. They carrymost of the upper-layer control tasks.
Control services on Unix computers are designed tobe accelerator-equipment oriented. Upper layer software

serves logical equipment controls hiding physical details.
Since several different controllers per a kind of equipment
were developed over a period of 20 years, every effort has
been made to carry hardware-dependent processes in thelower layer software. Most lower and upper layers communicate through the UDP version of the RPC in order torecover failures reliably, while the TCP version is used between the upper layers and the application clients.
Each layer uses a simple memory-resident hasheddatabase to process controls. Depending on the responsetime of the underlying layer, a layer may cache information, while methods to bypass the cache are also provided[7].
Besides running control-process software, Unix servers
also support many network services, such as file services (NFS, NetBIOS, AppleShare), a network firewall,
name resolutions (DNS, NIS), remote booting (BOOTP,DHCP, TFTP), time synchronization (NTP), failure reports(SNMP, SMTP), routine reports (HTTP), printer services(lpd, AppleTalk, NetBIOS) and office mail (SMTP, POP3).
Those services are run redundantly and are utilized froma number of control computers. They are used on the office
network as well in order to exchange information quickly
between engineers, the control group and the commissioning group. Essentially, at the beginning of the commissioning the database was updated every day using these services.

3 LINAC UPGRADE AND CONTROLSFor the KEKB project, the linac beam energy was upgradedfrom 2.5 GeV up to 8 GeV; also, 3.5 GeV positrons aregenerated [1]. In order to accomplish this, energy doublers (SLED) were employed and the length of linac wasextended by 50 percent; the number of accelerator devices
was also increased by roughly 50 percent.
Many old controllers for them, which were designed
about 20 years ago, could not be reproduced any more,
mainly because of production discontinuance of their components and company closures. More functionalities werealso eagerly required. Thus, new controllers were designed
based on the criteria of a UDP connection and being harddisk-less.
New controllers were designed utilizing VME, VXI,CAMAC, PC and PLC technologies, depending on theneeds specific to the corresponding devices.
Many of the newly designed simple controllers employed PLC’s (Programmable Logic Controller). Until recently, its performance and remote connectivity did notmeet our requirements. However, it just satisfies our needs
for simple controllers; further, its cost-performance is appealing. For example, the response time of a remote control
of several input/output ports over a network is about 20 milliseconds. Although this is 10-times slower than modern
VME processors, if large data processing is not necessary,

Figure 1: Beam-mode switching panel enables automatedbeam-parameter replacement, changing a number of equipment parameters. Some of them are processed in paralleland others sequentially.
a PLC is adequate for simple controllers [6].
Upper-layer software had been designed to be independent of the lower layers. It was, thus, relatively easy tointegrate new lower layer software for new controllers. At
least the RPC interfaces between the upper layer softwareand clients were kept unchanged, although the protocol was
independently extended to accommodate new needs.

4 COMMISSIONING SOFTWAREENVIRONMENT
Originally, Microsoft Windows and Visual Basic were considered to be an application development environment.
However, we didn’t have manpower to maintain the gateway to the control system, and to make new equipment in
the accelerator and new features in the control system available.
Thus, we had started to use the following environments:
Tcl/Tk and RPC for simple operations, which was originally prepared as a test tool for the control system, andSAD/SADscript/Tk for beam operations, which was designed for advanced beam physics. Both of them have interfaces to the control system and the Tk graphical widgets.
With SADscripts, we use both the direct RPC access to theFigure 2: Parameter load-save panel with features to selectmany options. These include device selection based on thelocation; also, database is shared between many applications.

linac and the EPICS channel access (CA) through the linac
CA server, which was developed using the EPICS portable
CA server toolkit.
Under those environments, common routines are provided as libraries, such as a control-system RPC interface, default menus, software error recovery, software
error logging, software parameter save/restore, debugging facilities, runtime software inspecting facilities, interapplication communication, etc. Those implementations
were relatively easy, since those languages are interpretors.

5COMMISSIONING APPLICATIONSThere are about fifty application programs registered in thelinac commissioning software launcher, which have been
modified daily based on the needs in the commissioning.
They include a beam-based BPM re-calibration, an online buncher simulation, an emittance measurement andmatching, an isochronous and achromatic correction to thearc section, an adaptive beam-orbit correction, a downhill
simplex optimization and linac feedback systems.
Some of them are shown in Figs. 1, 2, 3. Also feedback
systems for linac commissioning, which utilize the same
software framework, is discussed elsewhere [8].

6CONCLUSIONSThe combination of the linac control-system architecture
and the commissioning software environment greatly improved the linac operation and it could meet the linac commissioning needs. It could even accommodate applications
which were not included in the original design.

Figure 3: Active correlation plot automates equipment parameter optimizations. It can fit acquired data with arbitrary functions. A passive version of the correlation plot
enables one to find multi-parameter correlations, which are
not known beforehand.

7 ACKNOWLEDGMENTS
The authors would wish thank the linac staff for their support and valuable discussions.

8REFERENCES[1] A. Enomoto, “Upgrade to the 8-GeV Electron Linac forKEKB”, Proc. LINAC’96, Geneva, Switzerland, 1996.
[2] A. Enomoto and Linac commissioning group, “Commissioning of the KEKB 8-GeV/ 3.5-GeV
InjectorLinac”, Proc. EPAC’98, Stockholm, Sweden, 1998.
[3] Y. Ogawa and Linac commissioning group, “Commissioning Status of the KEKB Linac”, Proc. PAC’99, New York,U.S.A., 1999.
[4] K. Furukawa, N. Kamikubota, K. Nakahara and I. Abe,
“Upgrade Plan for the Control System of the KEK/Linac”, Proc. ICALEPCS’91, Tsukuba, Japan, 1991, p. 89.
[5] N. Kamikubota, K. Furukawa, K. Nakahara and I. Abe,
“New Control System with VME and workstations for theKEK / Linac”, Proc. ICALEPCS’93, Berlin, Nucl. Instr. and Meth. A352(1994)131.


[6] A. Shirakawa, I. Abe and K. Nakahara, “New Magnet Control System using PC and PLC”, Proc. ICALEPCS’97, Beijing, China, 1997.
[7] N. Kamikubota, T. Obata, K. Furukawa and T. Suwada,“Data Acquisition of Beam-Position Monitors for theKEKB Injector-Linac”, in these proceedings.
[8] K. Furukawa, A. Enomoto, N. Kamikubota, T. Kamitani, Y.
Ogawa, S. Ohsawa, K. Oide and T. Suwada, “Energy Feedback Systems at KEKB Injector Linac”, in these proceedings.