IMPLEMENTING PORTABLE CHANNEL ACCESS SERVER SOFTWARE
IN THE KEKB ACCELERATOR CONTROL SYSTEM
N. Yamamoto, K. Furukawa, N. Kamikubota, T.T. Nakamura, T. Katoh, KEK,
M. Kaji, Mitsubishi Electric Co. Ltd.,T. Kitabayashi, Mitsubishi Electric System & Service Engineering Co. Ltd.,S. Yoshida, Kanto Information Service Co. Ltd.
Abstract
Application
KEKB(KEK B-factory) accelerators are underconstruction and the control computer system for them isalso in the last phase of installation. KEKB accelerators
are composed of two storage rings, namely, HER(HighEnergy Ring for electrons of 8 GeV) and LER(LowEnergy Ring for positrons of 3.5 GeV). These rings areplaced in the underground tunnel in which former
TRISTAN electron-positron colliding accelerator was.
We have been constructing control system for KEKB
from the scratch based on EPICS(Experimental Physics
and Industrial Control Systems)[1][2][3]. But, for theinjector linac, its control computer system was
rejuvenated just a few years ago and it is not an EPICS
based system but an original one. To operate KEKB
accelerators, tuning of the linac as the injector for theKEKB rings is thought to be very essential. Ideally,
KEKB control system can control both KEKB rings andlinac. And both operators at linac control room and at
KEKB control room should be able to monitor and adjust
equipment of the other accelerators. For that purpose, wehave to develop suitable method in between two systems
to communicate with each other.
In the EPICS
collaborations, there is a Portable CA(Channel Access)Server for EPICS developed at Los Alamos National
Laboratory[4] for SUN workstations.
We decided tomodify it for our purposes and have been implementing itto KEKB control system step by step. And now, we canmonitor and set magnetic field of Q-magnets in the linac,
control beam transport magnets in the linac beam line,
control klystrons, and measure beam positions by stripline monitors through EPICS. In the near future, otherequipment of the linac will be added to the CA server
before the commissioning of the KEKB rings.
1 EPICS CHANNEL ACCESS ARCHITECTURE
EPICS is a distributed database control system. The
input/output data are distributed at each IOC(Input Output
Computer) around the system and can be accessed by theCA(Channel Access) protocol based on TCP/IP
communication through the network. On each IOC, there
are “Records” that represents the value of I/O channels.
CA protocol makes it possible to get or put values byusing channel names but by physical or absolute address
as shown in Figure 1.

CA Client

NetworkCA ServerIOC

Database
DriverEquipment

EPICS
ChannelAccessProtocolFigure 1. EPICS Channel Access architecture.
2 CONNECTION OF TWO CONTROL SYSTEMS
To connect KEKB control system and the existing linac
control system, a gateway must be provided between twosystems.
Figures 2 and 3 show two possibleconfigurations to realize it. In Figure 2, there is an IOC
dedicated to linac and it keeps the database of parametersand values of linac equipment. In the KEKB case, thetotal number of channels is estimated to be very large andit is too much for an IOC. Therefore, this method may
not be realistic.
On the other hand, a gateway workstation isprovided in the configuration shown in Figure 3. The
functionality of the EPICS CA is realized by the portable
CA server implemented in the gateway workstation. The
EPICS portable CA server was designed and developedby the members of EPICS collaboration society. Its aim
is to integrate a control system not using EPICS intocontrol system based on EPICS.
A UNIX gateway
computer will be placed between two systems and it
translates messages between two languages, one is EPICS
and the other is the protocol specific to the non-EPICS
system. The CA protocol was implemented as a set ofC++ classes. A User can easily extend CA server classes
using inheritance technique to build a custom-made CAserver.

KEKBCA Clients

LinacConsole

Linac Main
Controls

Linac SubControls

Linac MainControls

Linac
Gateway

LinacCA ServerKEKBIOC

Linac SubControls

KEKBIOC

KEKB
Equipment

Linac
Equipment

KEKB
Equipment

GatewayIOC

Linac
Equipment

KEKB
CA Clients

LinacConsole

EPICS channel access protocol
Figure 2. Connection using an IOC and a gateway.

EPICS channel access protocol
Figure 3. Connection using portable CA server.

3 IMPLEMENTATION OF CA SERVER
We have tested two ways described above. In both cases
EPICS record database are automatically generated fromthe equipment database. And it is also useful to have theutility programs to generate screen configuration data for
man-machine interface program MEDM(Motif basedEDM).
For these purposes tools were designed anddeveloped.
A tool named CreateLinacDatabase wasdeveloped. It generates a linac parameter configuration
file Linac.conf, which in turn converted to an EPICS
database file using dbLoadTemplate, a database
template file.
Another tool CreateLinacAdlFile
generates a screen description file for MEDM.
4 RESULTS
An example result of the implementation of the EPICS
CA server is shown in Figures 4 and 5. Figure 4 shows
plots of the beam positions of linac beam and Figure 5
shows an image of screen for linac beam transport line
controls using MEDM. You can see the values and thesliders for adjusting 48 magnets in a screen.
5 CONCLUSION
We expect communication between KEKB control system
and linac control system will be inevitable for KEKB
accelerator operation that will start coming October 1998.
And the link using a portable channel access server is apromising solution. By using this CA server approach,any existing control system would utilize EPICS tool kit
and get benefits from it.
Figure 4. Beam position displays using strip-line monitors.

6 ACKNOWLEDGMENTS
The authors wish to express thanks to other members ofthe KEKB and linac controls groups for their valuableadvice and helps.
7 REFERENCES[1] L.R. Dalesio, et al. ‘EPICS Architecture’, Proc.
ICALEPCS’91, KEK, Tsukuba, Japan, 1991, pp.278-282.
[2] T. Katoh, T. Mimashi, T.T. Nakamura, N. Yamamoto, A.
Akiyama, S. Araki, T. Kawamoto, I. Komada, K. Kudo, T.

Naito, T. Takashima and S-I. Kurokawa, ‘Status of theKEKB Accelerator Control System Development’,
ICALEPCS’95, Chicago, USA, 1995, pp. 899-902.
[3] T. Katoh, A. Akiyama, S. Araki, M. Kaji, T. Kitabayashi,T. Kawamoto, I. Komada, K. Kudo, T. Naito, J. Odagiri,M. Takagi, ‘Present Status of the KEKB Control System’,Proc. ICALEPCS’97, Beijing, China, 1997, to be
published.
[4] S. Schaller and M. Oothoudt, ‘Generalized Control And
Data Access At The LANSCE Accelerator Complex -Gateways, Migrators, And Other Servers", Proc.
ICALEPCS’95, Chicago, USA, 1995, pp. 943-948.

Figure 5. Screen image of the linac beam transport magnet controls.