The status of the control system of the KEK
accelerator test facility
N. Terunuma, H. Hayano, T. Korhonen, K. Kubo, T. Naito,
K. Oide, J. Urakawa, S. Kashiwagi* and T. Okugi**KEK, High Energy Accelerator Research Organization
Oho 1-1, Tsukuba, Ibaraki, 305 Japan*Department of Accelerator Science,
The Graduate University for Advanced Studies
1-1 Oho, Tsukuba, Ibaraki, 305, Japan**Department of Physics, Tokyo Metropolitan University
1-1 Minami-Osawa, Hachioji, Tokyo, Japan
Beam Diagnostics

1.54 GeV Damping ring

Water cooling & Air condition facility
Wiggler magnet

Water cooling & Air condition facility

Magnet power supply

13.8m

Modulator
Control room

50.4m

27.6m

53.4m

714MHz RF source

KlystronDamped cavity Wiggler magnet
L0Thermionic Gun

L1L2

L3L4Lec1

L5L6L780MeV Preinjector

L8L9L10L11L12Lec2

L13L14L15

L16

1.54GeV S-band LINAC

DC power supply for modulator

120m

Fig. 1 Layout of the KEK accelerator Test Facility.
Abstract
Beam Commissioning for the damping ring of the KEK
accelerator test facility (ATF) has been started sinceJanuary 1997. Control system of the ATF accelerator i s
based on the CAMAC-enhanced byte-serial highways
handled by the Open-VMS Cluster system. Control
software is integrated by using a commercial databaseapplication for process control. In this paper we present
the status of the ATF control system developed during thecommissioning phase.

been performed since January 1997, the start of the beamcommissioning of the damping ring.
The linac and the injection line to the ring have 16 Sband cavities for acceleration, two cavities for energy
compensation, 112 magnets and 41 beam position
monitors (BPMs). The damping ring and the extraction
line have two damped cavities, 386 magnets (includingeight wigglers), 112 BPMs, four current monitors, akicker for injection and two kickers for ejection.
2 System Configurations

1 Introduction

2.1 Hardware

The accelerator test facility (ATF) in KEK has a 1.54
GeV S-band linac and a 1.54 GeV damping ring [1,2].
Figure 1 shows the layout of ATF. Length of the linac i s
70 meter and circumference of the ring is 138.6 meter.
Aim of this facility is to study the low-emittance-beamphenomena and to develop technologies for a future
linear collider [3]. Studies to understand the behavior of
the hardware devices and that of the beam itself, have

Front-end devices for accelerator control are handled b y
the CAMAC networks consist of the enhanced serial
highway driver (SHD, 2160-Z1F) [4] and many CAMAC
crates (up to 64) located near the front-end devices. This
highway has a capability of 5 Mbytes per second of datatransmission. Main part of this network was connectedwith optical fibers to avoid an irregular noise from highpower devices. There are two CAMAC networks in ATF.

KEK Network

100MbpsDEC Swiching HUB 900

ATF Control Room

10Mbps100MbpsDEC Swiching HUB 900

MPTHP/UNIX
Windows95
Mac...

100Mbps
AlphaServer2100
4/233

RAID
DISK
20GB

10Mbps

10Mbps

10MbpsVAX Server
4000/106AXAVatsX
AV04noi?
0?
09ts
X
AV

noita?
04oiats

04n09?

?

?
09

VAX Station 4000/90
x6

VAX Server
4000/300
Qbus
CAMAC SHCAMAC SHto LINAC

to Damping Ring

Fig. 2 Cluster configurations in the ATF control system.
One is for the linac and the beam transport line to thering. The other is for the ring and the beam diagnostics
line from the ring. Each SHD is inserted in the Q-bus slotof the VAX server 4000, therefore we use two VAX
servers.
Configuration of the computer cluster system is shownin Figure 2. Most of the control tasks are running on theAlpha server 2100, because it has the highest
performance. Six stations (VAX station 4000/90) areused as the user terminals for the accelerator control andfor the software development. These machines areconnected with a switching HUB (DEC VN900EF). The
operating system is the Open-VMS V7.1.

Graphical Operator Interface(Vdraw)
StatusDisplayWindowsControlPrograms

Analysis
Applications•User Written•
Programs•

SAD,MATLABCERNLIBATF Database Access Libraries
Vsystem Database & Functions (Vaccess)Log-data
Display(Vtrend)

DataLogging(Vlogger)

Hardware Device Drivers
CAMAC System

2.2 Software
Overall structure of the control software is shown i nFigure 3. The core part of the data handling is supported
by Vsystem [5], a commercial database application for aprocess control, therefore we can concentrate to develop
the hardware control routines and analysis routines.
Vsystem supports the mechanism of distributingdatabases across the networks. User interface layer i s
supported by VDRAW that is one component of theVsystem and a very convenient display-and-control tool
based on the Motif.
We can define multiple databases individually on local
and remote node in the cluster. The identification of eachdatabase is done by the logical names based on the VMS
service. The definition for local database and remote one
is different. For local database, we define the logicalname as the file name of the database object. For remote
database, logical name should be defined with the nodename as ‘node_name::”task=vserver”’. Vserver is one ofthe Vsystem process to access a remote database using
the DECNET objects. The database logical name i stransparent in the cluster so that the style to access thedatabase is identical both in local and remote node.
A basic element of a database is called “channel” and i tshould be defined one of the various data types; integer,real, binary, strings and arrays. Channel has an automaticFig. 3 Software configurations. Vdraw, Vaccess, Vtrend andVlogger are Vsystem components.
mechanism to execute some user-written function when
the channel access has occurred. This function is called“handler”. For example, a read access to a channel thatshows a hardware status executes the CAMAC read actionof the target hardware.
3 ATF DatabaseIn the cluster system, we use a lot of logicals to identify
databases. We set a prefix to the database logicals as DB_for that on the Alpha server, DB1_ for that on the linac
server and DB2_ for that on the ring server. Channels are
named with a hardware-device name like ‘device_name:generic_type’, where the generic type describes the data
element of the hardware.
3.1 Device Access
There are two ways for writing and reading the CAMAC
on a remote server from a local machine. One is a directcall of a network CAMAC function that we prepared andthe other is a Vserver method in the Vsystem.

3.1.1 CAMAC network functions
At the first commissioning of the linac in October
1995, we needed to move software from slower VAX
server to faster Alpha server. Since the Alpha server had
no hardware CAMAC networks, we prepared the networkCAMAC processes between Alpha and VAX servers b yusing VMS services [6]. To keep the compatibility ofcodes, the format of CAMAC functions is unified as thatof the IEEE CAMAC standard [7]. Identification of thetarget CAMAC network is done by changing the CAMAC
branch number. Device libraries for the linac weresuccessfully installed into the Alpha server. This is quite
simple and convenient, but leads to a heavy CAMAC
traffic on the cluster network.
An average time to execute a CAMAC single action
from Alpha to VAX server 4000/300 (for linac) is 5 ms.
For VAX server 4000/106A (for ring), it is 1 ms. The
CAMAC access speed in the VAX is 2 ms and 0.5 ms forlinac and ring, respectively. The performance of aCAMAC access is limited by the network overhead.
Therefore, we prepared a function that executes many
single actions in a network call.
3.1.2 Handler method
Another method is a remote channel by using theVserver mechanism as described before. Databases andhandlers are exist in the remote computers. In addition,Vsystem has the ‘list’ channel access to the remote
database. This accesses multiple channels in a function
call from user routines. Performances of the list-mode
were measured between an Alpha server and a VAX server
under the CPU load in the beam experiments. Table 1
shows the results with and without the CAMAC access i nthe handler.
In ATF, there are many magnet power supplies thathave different interfaces due to the difference of themanufacturer. Handler method is convenient to keep thechannel structure for all magnets by changing the accessroutine in the handler level.
Table 1
Performance of remote database access from Alphaserver to VAX server (channels/second).
nowithmode
CAMAC
CAMAC
VAX(linac)
normal
60
50
list
1000
344
VAX(ring)
normal
198
196
list
5520
1428
3.2 Standalone process
Some channels have no “automatic” handler options t oavoid a heavy concentration of hardware accesses. Only
the background readers enable the “automatic” option i nthemselves and then update the channel values. Other
processes get a channel value without executing thehandler. We made some readers to update the hardware
status and the BPM data.
The orbit handling such as the correction of the closed
orbit distortion, local orbit bumps and the optics

changing, is done by changing the magnet settings
calculated by the model. We use a computer program
complex for the accelerator design named “SAD”. All ATF
lattices are designed by using this code. SAD is runningon the other cluster in the KEK network. We prepare theautomatic communication procedure submitted from theoperator window.
3.3 Present status
At present, we use 28 databases for the accelerator
control. They have 12667 channels in total; 4639
integer and 5454 real and other are binary and strings.
Largest database is for magnets and it has 7520 channels.
Channels that have an automatic handler option are only
384, therefore we are adding this option into morechannels to improve the overall performance.
Background processes are updating the channel datawith specified time intervals. For ring’s BPMs, data arerefreshing by every beam injection (0.75 Hz). Graphicalplots on the window are updating similar rate. Even if thebeam injection rate reaches maximum rate (25 Hz), wecould update the data in the database.
We plan to install many monitors to measure thebehavior of the extracted beam and plan to develop theon-line analysis tools. Although the data handling in thesystem will become more complicated one, we will beable to optimize the control system by using our databasesystem.
4 SummaryThe control system for the ATF accelerators has beendeveloped by using the process-control-database system,
Vsystem. We succeeded in creating the system in alimited time and staff by combining our device driver
software and this database application. Now we arechanging the database structure to use the distributeddatabase feature more effectively. This will improves theoverall performance of our system.
5Acknowledgments

We would like to express our thanks to Professor M.
Kihara and Professor K. Takata for his encouragement.
We wish to thank other ATF members for their support.
6 References[1] Ed. by F. Hinode, et al., KEK Internal 95-4 (1995).
[2] J. Urakawa. et al., NIM A293 (1990) p23-26.
[3] JLC Design Study, KEK Report 97-1 (1997).
[4] Developed by Kinetic Co., Ltd.
[5] VSYSTEM is a product of Vista-Control Systems,Inc., Los Alamos, New Mexico.
[6] T. Korhonen et al., Proc. of the 21st Linear
Accelerator Meeting in Japan, Tokyo, p174.
[7] ANSI/IEEE Std 758-1979, IEEE Standard Subroutines
for CAMAC.