IMPLEMENTING PORTABLE CHANNEL ACCESS SERVER SOFTWARE IN THE KEKB ACCELERATOR CONTROL SYSTEM

KEKB(KEK B-factory) accelerators are under construction and the control computer system for them is also in the last phase of installation. KEKB accelerators are composed of two storage rings, namely, HER(High Energy Ring for electrons of 8 GeV) and LER(Low Energy Ring for positrons of 3.5 GeV). These rings are placed 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 the injector 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 the KEKB rings is thought to be very essential. Ideally, KEKB control system can control both KEKB rings and linac. 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, we have 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 to modify it for our purposes and have been implementing it to KEKB control system step by step. And now, we can monitor 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, other equipment 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 the CA(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 by using channel names but by physical or absolute address as shown in Figure 1. 2 CONNECTION OF TWO CONTROL SYSTEMS To connect KEKB control system and the existing linac control system, a gateway must be provided between two systems. Figures 2 and 3 show two possible configurations to realize it. In Figure 2, there is an IOC dedicated to linac and it keeps the database of parameters and values of linac equipment. In the KEKB case, the total number of channels is estimated to be very large and it is too much for an IOC. Therefore, this method may not be realistic. On the other hand, a gateway workstation is provided 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 developed by the members of EPICS collaboration society. Its aim is to integrate a control system not using EPICS into control 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 of C++ classes. A User can easily extend CA server classes using inheritance technique to build a custom-made CA server. Application