The lith Symposium on Accelerator Science and Technology, Harima Science Garden City, 1997

Status of the KEKB accelerator control system development
Tadahiko KATOH, Atsuyoshi AKIYAMA, Sakae ARAKI, Masahiro KAJI*Teruyuki KAWAGUCHI**, Takashi KAWAMOTO, Ichitaka KOMADA, Kikuo KUDO,Takashi NAITO, Jun-ichi ODAGIRI, Makoto TAKAGI***, Susumu YOSHIDA***, and Noboru YAMAMOTO,Accelerator Facility, KEK, Tsukuba, Ibaraki, 305 JAPAN(*) Mitsubishi Electric Co. Ltd.
(**) Mitsubishi Electric System & Service Engineering Co. Ltd., Tsukuba, Ibaraki, 305 Japan(***) Kanto Information Service, Tsuchiura, Ibaraki, 300 JAPAN
Abstract

KEKB, an asymmetric electron-positron collider, isin the last phase of its construction. The status of thedevelopment and installation of the control system for
the KEKB will be reported in this paper.
Installation of the basic equipment for the KEKB
accelerator control system, including FDDI network cables between the central control room and sub-control
rooms, was finished in spring 1997. This basic system
is now being used for the development of software forthe KEKB accelerator control system. Extension of thesystem for the first commissioning is scheduled later thisyear.
The KEKB accelerator control system is based on
the EPICS (Experimental Physics and Industrial Control System) tool kits for accelerator control system.
EPICS tool kits uses the variant of so-called "standardmodel" of an accelerator control system. Use of EPICS
tool kits reduces needs for the development of basic software.
Relational database is another key component in theKEKB accelerator control system. An end user interface
using the WWW browser is developed and is under thefield test.
Power supply controller board has been developedand tested. The board uses ARcnet as the communication interface to the VME controller module in the
KEKB accelerator control system.

Table 1Main parameters of KEKB
RingEnergy
Circumference
Luminosity
Beta function atIP
Beam current
Partid3s I bunchEmittanceECL

f3 r I {3y€rSynchrotron tune

V 8

Betatron tune

Vr

RF voltage
Harmonic number
Bendil!:g radius

Vchp

Vy

LER
3.5

HER
8.0

3,016.261034
0.3310.01
2.6
1.1
3.3 X 10 10
1.4 X 10 10
1.8 x 10- 8
3.6 x 10- 10
0.01 ~ 0.02
45.52
46.52
45.08
46.08
5 ~ 1010 ~ 20
5,120
15.3
76.6AmMVm1 Introduction

KEKB[1] is a project to build an asymmetricelectron-positron collider in Japan. The first commissioning of the machine is scheduled in the fall of 1998.
The main parameters of the KEKB accelerators are summarized in Table 1.
As reported before[2], We use the EPICS [3] toolkit. The following section briefly summarizes architecture of the EPICS and related topics. The design of theKEKB accelerator control system network is describedin Section 3 .
A relational database is another key component of
the KEKB accelerator control system and is discussedin Section 4.
We developed a magnet power supply controller
board for the KEKB accelerators. It uses ARCnet asa communication interface and reduce cost and space ofcabling for 2,154 magnet power supplies of the KEKBaccelerators. Development of the board is reported inSection 5.

And C•ntral
Terminal RoomFig. 1 Schematic view of the KEKB accelerator control system.

-452-

The 11th Symposium on Accelerator Science and Technology, Harima Science Garden City, 1997

2 EPICSEPICS is a collection of software tools developedby EPICS collaboration. EPICS assumes that the control system is consists of 1) Distributed intelligent Input/Output Controllers(IOCs), 2) High-speed network
based on TCP /IP and 3) Unix and/or Windows NT hostcomputers for various high level control applications including human interfaces and data logging.
A VME single board computer running VxWorks
real-time operating system is used as an IOC in EPICS.
The IOCs are distributed along the accelerator.
EPICS run-time database on the IOC and CA constitute the core of the EPICS software. An EPICS client
software accesses the record in this run-time databaseusing the logical name of the record. The protocol to access data in the distributed run-time data base is called"Channel Access(CA)". Read and write accesses to theEPICS run-time database from the EPICS client software triggers the access to the hardware from the IOC.
User of EPICS only needs to supply hardware specificroutines, hardware driver and device support routines.
EPICS core software also includes programs suchas 1) Scanner to scan the status of hardware in theway specified by the user, 2) CA server to handle thedatabase access request from the client program. Configuration files prepared by the user define the actual
behaviors of these programs.
User can also extend the EPICS core software using
the hooks in itself. For example, user can add a supportof a new device to the EPICS by supplying a device
driver and/or device support routines.
EPICS CA applications such as MEDM(Motif based
Editor & Display Manager), ALH(Alarm Handler) andAR_cmd(EPICS Archiver) runs on the host computer.
These applications are driven by configuration files. So
the EPICS user can build a basic control application
without any programming.
We use Mitsubishi ME RK-460 computer(HP-UX10.20) equipped with two CPUs as the host computerin the KEKB accelerator control system. The hostcomputer also serves a development environment forVxWorks which is the operating system of IOCs. Xterminals are used as an operator interface in the KEKB
accelerator control system.
We currently use the version R3.12 of EPICS on thishost machine. A test of the latest release of EPICS software, R.3.13 beta 11, is under way. The gateway program to the LINAC control system is now being ported
using the portable CA server program included in R3.13.

',rPython Programs'-Iy SAD Programs'"')Y'-I/SADInterpreterPython
Interpreter
EPICS CA Tkwidgets EPICSCA

SAD embeds theFig. 2 SAD /Python relatiOn.
Python interpreter in it. SAD calls Python touse a Tk widget. Both SAD and Python has
EPICS Channel Access interface for the historical reason.
application development. A Tk widget is integrated withPython as a Python object. It allows user to access Tkwidgets from Python in a seamless way and makes it
easier to develop and maintain a Python program with
GUI(Graphical User Interface). The embedded Pythoninterpreter in the SAD[4] code allows a SAD programmer to develop a program with GUI as a SAD program.
Figure 2 shows the relation of SAD, Python and EPICSCA in current implementation.

2.2 Power PC
We have been using Force CPU40 VME board computers for the evaluation of EPICS software. We introduced Force CPU64 CPU board for better CPU performance in FY 1996. We have tested a VME singleboard computer based on Motorola PowerPC604e running at 200MHz and found ten times CPU performance
improvement over CPU64 in EPICS environment.
Experience of porting the EPICS core software tothe PowerPC architecture encourages us to choose new
CPU board for ll!uch better performance. We will introduce a new CPU board based on MPC700 CPU runningat 266MHz later this year. It should also be pointed thatthe ease of porting greatly depends on the compatibility of VxWorks libraries and the compiler between twoarchitectures.

3 Network
2.1 SAD-Python
MEDM and/or EDD/DM (Display Editor/DisplayManager) are useful development tools for building basic control panels. User of MEDM can build a graphicaluser interface screen without any conventional programming. However, some high level applications may not fit
in this framework. Python[5]-EPICS interface is developed to fulfill this shortcoming. Python is an object oriented scripting language developed by G. van Rossum.
Clear yet powerful syntax of Python is suitable for rapid

The Figure 1. shows a schematic view of the KEKB
accelerator control system. As shown in the figure, thenetwork consists of a switched FDDI network as a backbone network. An FDDI/Ethernet bridge bridges theFDDI backbone network and an Ethernet network in a
sub-control room. Ethernet part of the bridge works asa switching hub rather than simple bridge. This configuration reduces possibility of packet collision.
We adopted a star configuration and a fast FDDI
switch for the backbone network. Each local control-453-

The lith Symposium on Accelerator Science an,d Technology, Harima Science Garden City, 1997

room is connected directly to the central part of theaccelerator control network. It gives us the possibility ofthe transition to the future network technology, such as
ATM, without re-cabling of fiber optical cables.
A console(serial) port of an IOC is connected to aterminal server. User can remotely access IOCs throughboth Ethernet and a serial port of the terminal server.
This is useful to diagnose status of IOC when it does
not respond to the network. A VME system monitor
board is also connected to a serial port on the terminal server. The VME system monitor board monitors
voltages of power supply lines in VME-bus and several
external signals. When the board detects abnormal status, it sends the alarm message through the serial link.
The VME system monitor board resets VME backplane
when it receives the reset command through this serial
connection.
FDDI backbone network as well as branch Ethernet
networks were installed in spring of 1997. The installedsystem is used regularly for the development of softwareand for hardware test. So far no problem was found in
the system except initial hardware trouble.
4 Relational Database
We will use the relational database for 1) management of the data used in the accelerator control system,
such as hardware addresses, and 2) archiving of the datataken by the accelerator control system.
The first database is used to generate the configuration files for EPICS runtime database. Logical design ofthe database based on Entity-Relation(ER) diagrams isin progress.
The second database keeps various kinds of datafrom the accelerators, such as orbit position data andthe magnet configuration. The correlation between thesedata should be retrieved from the database.
We use ORACLE as a relational database manager.
An ER diagram is converted to an oracle database using a commercial tool. The device information databasefor the KEKB accelerator control system is created bythis method. The device database can be accessed by
WWW(World Wide Web) browser. Figure 3 shows anexample of the displayed screen by the WWW browser
accessing the device database. Oracle Web Server on thehost machine dispatches a request from the browser tothe application program written in the SQL Plus language. The application program dynamically generates
HTML documents and sends them back to the Oracle
Web server. It makes us free from the maintenance of theclient program. Poor development environment and incompatibility between WWW browsers are current major problem in this approach but will be resolved soon.
5 Power Supply Controller
Over 2,400 magnet power supplies will be connectedto the accelerator control system. It became very important to reduce the number of cables between magnet
power supplies and the accelerator control system. We
developed the power supply controller card which canbe installed inside the magnet power supplies. It uses

ARCnet as a field-bus for the communication with theaccelerator control system. Around twenty power supply controller cards are daisy-chained in a single ARCnet
link. The board has a CPU unit that manages ARCnet
communication and the ramping of the output current.
Prototype cards of the power supply controller werebuilt and tested. The controller cards successfully controlled power supply units in the EPICS environment.
6 Conclusion
A basic set of the KEK accelerator control system
was installed and has been working. The power supply
control card design was fixed and the cards for the magnet power supplies will be delivered by the end of thisfiscal year. Power PC based IOCs will be also installedin the system in this fiscal year.
Software development/improvement will be continued until the commissioning of the KEKB accelerators,
even after it. Designing the EPICS database templatefor each hardware device will be the major effort in thesoftware development.
References[1] "KEKB B-Factory Design Report", KEK Report 957, August 1995
[2] T.Katoh et al., "Status of the KEKB accelerator control system development's" ,ICALEPCS95[3] B. Dalesio et al. "Distributed Software Development in the EPICS Collaboration," in Proceedings of International Conference on Accelerator andLarge Experimental Physics Control Systems, M.
Crowley-Milling, P.Lucas and P.Schoessow, Eds.
(ICALEPCS,Chicago, USA, 1995),pp 360- 366.
[4] "SAD
homepage"
at"http:/ /www-acc-theory.kek.jp /SAD/ sad.html"[5] M.Lutz, "Programing Python", O'Reilly & Associates, Inc. USA, 1996
[6] S. Wolfram, "Mathematica: A system for Doing
mathematics by Computer", 2nd ed. Addison-Wesley
Publishing Company, Inc. USA, 1991

-454-