WEAP025
physics/0112037

INTRODUCTION OF MODERN SUBSYSTEMS AT THE KEK
INJECTOR-LINAC
N.Kamikubota, K.Furukawa, KEK, Tsukuba, Japan
S.Kusano, T.Obata, Mitsubishi Electric System and Service Co. Ltd., Tsukuba, Japan
Abstract
RPC (remote procedure call), based on TCP/UDP protocols,
As an accelerator control system survives over several years,
it is often the case that new subsystems are introduced into
the original control system. The control system for theKEK electron/positron injector-linac has been using Unix
workstations and VME computers since 1993. During theeight-year operation, we extended the system by introducing a) Windows PCs, b) PLC controllers with a network
interface, and c) web servers based on modern information
technology. Although such new subsystems are essential
to improve control functionalities, they often cause communication problems with the original control system. We
discuss the experienced problems, and present our solutions
for them.

1t::

INTRODUCTION

The KEK linac was constructed as an injector of the Photon
Factory storage ring about 20 years ago [1]. The first beamof 2.5-GeV electrons was provided in 1982. This linac now
provides electron/positron beams to several rings [2]: a)
3.5-GeV positrons to the KEKB LER (KEK B-factory Lowenergy ring), b) 8-GeV electrons to the KEKB HER (Highenergy ring), c) 2.5-GeV electrons to the PF ring, and d) 2.5GeV electrons to the PF-AR ring. The first control system,
which consisted of mini-computers and CAMAC interfaces[3], was replaced by the present control system in 1993 [4].
The present system comprises Unix workstations and VME
computers. It has been upgraded occasionally [5] and usedover the past eight years.
In this article, we discuss newly introduced subsystems
in recent years. They were introduced in order to improvethe control functionalities, and/or to enable better maintenance capabilities. Three subsystems are described in detailin Section 2. The experienced problems between the subsystems and the original control system, and their solutions
are discussed in Section 3.

2

are used for communication between them. A simplified
view of the control system is shown in Fig. 1.

NEW SUBSYSTEMS

2.1 Control System Overview
The present control system comprises 4–6 UNIX workstations, 27 VME computers with the OS-9 operating system,
140 PLC (Programmable logic controller) controllers, and
11 CAMAC interfaces with a network port. A home-made))

Figure 1: Simplified view of the control system.
The total number of control signals is about 6000 (in 2byte unit). Since 1998, when the CP violation study started
with the KEKB rings, the operation of the linac exceeded
7000 hours per year. The number of control transactions
handled by the control system increased every year, andreached 350 transactions per sec. in June, 2001 [6].

2.2 Windows PC
Since the end of the 1980’es, we have had strong interest inusing PCs. The PC-based operator’s console system started
with DOS PCs [7], and later reinforced with Windows PCs[8], has been successfully used for more than ten years. In
the early phase, the following points were preferable for us:a) enhanced capability of 2-byte code (Japanese characters)
handling, b) good development environment of graphic applications, and c) low cost.
The present console system comprises about ten PCs(Windows NT and Windows 2000). The surveillance applications for accelerator devices were developed in Visual Basic, and have been used in daily operation. The operation

log-book using MS-SQL and Access [9] is extensively usedeveryday with this console system.
Communication with the control system, which runs atthe Unix workstations, is made by a gateway (a WindowsPC). When the gateway receives a control request from aconsole PC by the OLE, it communicates with the appropriate device server(s) by using the RPC protocol (see Fig. 1).
The gateway and the present console system have been successfully used over the past six years.

KEK linac started in May, 1994 [10]. Up to now, we havedeveloped many web pages to inform about the linac operation status.

2.3 PLCb) Real-time display by Java and CORBA Feasibility studies of a web-based real-time display using Java andCORBA have been carried out. The measured round-trip
time between a Java applet and a CORBA server (at anUnix workstation) was 50 ms [11, 12]. The server does notconsume CPU resources compared with the CGI-based services. Recent updates have enabled realistic demonstrationof the beam-current history at the KEK linac [13].

The main part of the control system for the KEK linac wasrenewed in 1993 [4]. However, the local controllers (shownas SBC1 in Table 1) remained. In recent years the maintenance of these local controllers has become difficult. Thus,
we decided to replace them with new controllers.
Table 1: Replacement of local controllers.
device and before
transition present
transition
1993
phase
status
Klystron
CAMAC VME
Ethernet’97-’98–>SBC–>SBC–>PLCx70
MagnetCAMAC VME
Ethernet’96-’00–>SBC–>SBC–>PLCx51
VacuumCAMAC VME
Ethernet’96-’97–>SBC–>SBC–>PLCx18
Trigger
CAMAC VME
Ethernet–>SBC–>CAMACx11’97-now
–>SBC
BPM
none
Ethernet
since ’97–>VMEx19
A typical local controller should have a) a few hundred
I/O points, b) simple but programmable control logic, and c)
a communication path to the main control system. Amongsome candidates, a PLC with a direct network port (Yokogawa FA-M3) was chosen for klystron modulators, magnet
power-supplies, and vacuum controllers. The VME computer was a candidate, but was not selected, because thePLC is less expensive. The replacements of local controllers
since 1996 are summarized in Table 1.
It is interesting that all of the new controllers shown in Table 1 have an Ethernet port. A background fact is that worldstandard field networks (CAN-bus, Profi-bus, MIL1553,etc.) are not popular in Japan, and we want to use Ethernet as a field network. The use of a standard Ethernet ispreferable for long-term maintenance and cost reduction. In
addition, we use optic-fiber cables for the network to localcontrollers in order to avoid electro-magnetic noise from theklystron modulators.

2.4 Web and Related Topics
We have recently experienced fast improvements of information technologies. The world-wide-web services at the1 Such old local controllers were controlled by Single Board Computerswith micro-processors [3].

a) Status of accelerator devices The web-server machine is a part of the control system. Thus, by using the CGI(Common Gateway Interface) script, it is easy to develop ahomepage to show the status of any linac device. A large
number of pages have already been developed.

3DISCUSSION

3.1 Problems with Subsystemsa) Windows PC The main language for the Windowsbased console PCs is Visual Basic, while the sources at theUnix side have been developed in C language. For example,
the sources for the RPC use socket (Winsock) functions atthe Unix (Windows) side. Thus, the maintenances havebeen made independently. This fact implies that when we
have some improvements at the Unix side, it always takes
time for the improvements influence the Windows side.
We have operated a TCP/IP network system which contains both Unix workstations and Windows PCs. As thenumber of Windows PCs has increased, we experienced
communication errors by two specific intervals (2 hours and12 minutes). They were removed by changing the default
settings of MS Office and Samba [15]. We also experienced
an accident in which the network burst from Windows PCs
occupied the network system, followed by a short-time mistake of network cable connections. At the time of the accident, the burst stopped all network modules of the PLC
controllers. We modified the parameters at the networkrouters so as not to enhance the burst broadcasts.
b) PLC After the KEKB commissioning started in
1997, we developed various slow-feedback applications[14] in order to realize stable beam injections to the KEKBrings. By the end of 1998, the CPU capabilities of Unix
workstations were found to be insufficient for increasing
demands. The analysis showed that the klystron server (seeFig. 1) consumed a very large fraction of the CPU resources
for network communication with PLC controllers. In thesummer of 1999, we prepared on-memory cache areas tokeep klystron data at the Unix workstations. Two linux PCs
have been used to update the cached data by polling the PLC
controllers [15, 16]. The network traffic decreased to one
fourth, and the problem disappeared.

Up to now we have introduced the cached scheme even forother devices.2 . Considering the number of control transactions [6], we can conclude that the intelligence of the PLCs
was not sufficient for our case. Thus, we added more intelligent devices (PCs) between the device servers and thePLC controllers, as shown in Fig. 1.
c) Web Web presentation of the KEK linac status would
consume larger CPU and network resources than dedicatedapplications. The considerable increase of web accesses inrecent years implies that we will need more computer resources in our control system. A more serious problem isthat we will need more man-power to maintain both dedicated applications and web-based services. We are eager forsome tools which would enable us automatically generate
web contents.

3.2 Transition of Control Architecture
We are now ready to discuss the long-term transition of
the basic architecture of the control system for large accelerators. Taking into account various accelerator control
systems in the past 20 years, the transitions of control standards are given in Table 2 (upper). Private expectations forthe next decade (2000’es) are shown in Table 2 (lower).
Table 2: Transition of large accelerator control.

consolebase-machine(language)
network
localcontroller

consolebase-machine(language)
network
localcontroller

1980’es
CUI(text-base)mini-computer
FORTRANdedicated network
dedicated protocol
CAMAC

1990’es
GUI on X(window-base)
Unix workstation
Cstandard Ethernet
on TCP/IP
VME withRT-OS

2000’es (private expectation)a) GUI on Windows-PC (for operation)b) toolkit/environment (for study)c) Web/cell-phone (for announcement)
Linux, or 64/128bit Unix
Java, C++TCP/IP and CORBA
http (for web)
PLC with Ethernet (for simple I/O)
Linux box (for intelligent controller)

The present control system for the KEK linac, whichstarted in 1993, can be expressed as a typical standard of the1990’es model. We conclude that our extensions (introducing subsystems in the past eight years) can be understoodas an evolution toward the new standard of 2000’es.
2 The vacuum system started to use cache in June, 2000. For magnet
power-supplies, we had a Windows PC as a gateway since 1997 [15]. The
BPM servers use cache from the start of the service in 1997.

4 ACKNOWLEDGMENT
The authors acknowledge Prof. A. Enomoto and Prof.
K. Nakahara for kindly supervising our work. We thankI. Abe for discussions on using Windows PCs with Unix
workstations. The various improvements of PLC-based local controllers have been carried out by A. Shirakawa. We
also thank the KEK linac operators for cooperative and successful works to improve our control system.

5REFERENCES[1] J.Tanaka, Nucl. Instr. Meth. 177(1980)101-105[2] Y.Ogawa and Linac Commissioning Group (LCG), "Commissioning Status of the KEKB Linac", Proc. PAC’99, New York,Mar.-Apr.1999, p.2984-2986[3] K.Nakahara, I.Abe, R.P.Bissonnette, A.Enomoto, Y.Otake,T.Urano and J.Tanaka, Nucl. Instr. Meth. A251(1986)327[4] N.Kamikubota, K.Furukawa, K.Nakahara and I.Abe, Nucl.
Instr. Meth. A352(1994)131-134[5] N.Kamikubota et al., "Improvements to Realize a Higher
Reliability of the KEK Linac Control System", Proc.
ICALEPCS’95, Chicago, Oct.-Nov.1995, p.1052-1055[6] N.Kamikubota et al., "Growth of Control Transactions ofthe KEK Linac during the KEKB Commissioning", Proc.
APAC’01, Beijing, Sep.2001; KEK-Preprint 2001-124[7] K.Nakahara, I.Abe, N.Kamikubota and K.Furukawa, Nucl.
Instr. Meth. A293(1990)446-449[8] I.Abe, H.Kobayashi and M.Tanaka, "PC based Control Systemusing ActiveX in the KEK e-/e+ Linac", Proc. PCaPAC’99,Tsukuba, Jan.1999, KEK-Proceedings 98-10[9] M.Tanaka, I.Abe and H.Kobayashi, "Database system in the
KEK Linac PC-based Control", Proc. PCaPAC’99, Tsukuba,Jan.1999, KEK-Proceedings 98-10[10] http://www-linac.kek.jp[11] S.Kusano, N.Kamikubota and K.Furukawa, "Real-time Display of Accelerator Status Using JAVA and CORBA", Proc.
PCaPAC’99, Tsukuba, Jan.1999, KEK-Proceedings 98-10[12] S.Kusano, N.Kamikubota and K.Furukawa, "Study of
Sharable Applications Using Java and CORBA", Proc.
ICALEPCS’99, Trieste, Oct.1999, p.535-537[13] N.Kamikubota, S.Kusano and K.Furukawa, "ArchiveDatabases as Distributed CORBA Objects", presentation atJPS meeting, Okinawa, Sep.2001[14] K.Furukawa et al., "Beam Switching and Beam Feedback
Systems at KEKB Linac", Proc. LINAC2000, Monterey, CA,Aug.2000, p.633-635[15] N.Kamikubota, "Introducing PCs to Unix-based control systems", presentation at PCaPAC2000, Hamburg, Oct.2000[16] S.Kusano, N.Kamikubota and K.Furukawa, "Use of LinuxPCs for Device Surveillance at the KEK Injector-linac", to besubmitted