The Status of the BEPC Linac Control System
Gu Peng Da,

Pei Guo Xi,

Kong Xiang Cheng,

Le Qi,

Zhang Feng Xia

Institute of High Energy Physics, Chinese Academia of Sciences, Beijing 100039, P.R.ChinaIntroduction
The control system of the BEPC Linac has been being
upgraded since 1993. Now an entirely new control system
based on industrial PCs has replaced the old system basedon manual operation. The system was put into fully routine
operation since October 1995. It has been proved to thestable, reliable and efficient in the last two runs of BEPC.
The e± switch time and injection time are greatly reduced,
since all magnets can be set in a few minutes automatically.
Operator interfaces are friendly and easy to use. Systemfailure very few and can be restored in a very short time.
We are now networking all the computers together anddoing some telecontrol experiments.
1 System architecture
The system consists of six industrial PCs. Each isresponsible for the control and monitor of one or more
BEPC Linac subsystems. They form the basic elements ofa distributed control system. A/D cards, D/A cards andbinary I/O cards are inserted into the expansion slots ofindustrial PCs . We use 12-bit ADC for data input and 12bit DAC for output. The functions of each PC is described
below.
1.1 The control of magnet current.
It controls all the power supplies for quadrupoles¡ ¢thesteering coils and the focusing solenoids. These are theprincipal means to optimize the electro-optical paths. Gooddata of magnets are stored on the hard disk for further
analysis and reference. The parameters for e+ and e− arestored in the memory, so the switch from one state toanother can be done instantly. This avoids the poor
repeatability caused by manual operating. The complexityof beam tuning decreases, and the beam tuning task iseasier to perform.
1.2 Remote control of the modulators.
A new local system based on the PLC was installed andthe communication between the control room and themodulators were accomplished. PLCs are used to replace
the original relay control logic circuits of modulators. The
new system is more flexible and reliable than the old one.
The control PC inspects the PLCs through RS-232 port.
The DC voltage, charging current, external failure signal,
filament control ¡ ¢filament current etc are sent to thecontrol room. The DC voltage can be controlled remotely.
1.3 Target switching and phase adjustment.
The target switching can be performed by pushing abutton on the screen. The microwave phase and magnet
switching of the positron capture section are accomplishedautomatically. The phase adjustment of single RF source isaccomplished on this computer.
1.4 Vacuum monitoring.
The status of the vacuum system is monitored by a PC.
The section vacuum values, waveguide vacuum values, ion
pump state and ion pump current values are gathered by thePC. When one of the section vacuum or waveguidevacuum values degrades to a certain value, there will besound and screen color warning signals.
1.5 Others
The energy analysis, emittence measurement or the phaselocking for RF phase control can all be performed by PCs.
The control programs were primarily developed using
Turbo C under DOS. We are now porting them toWindows platform using Microsoft Visual C++.
2 Networking
The networking of the BEPC Linac control system began
in May 1996. Now the hardware and software
configuration.have been completed. The telecontrol experiments have been done successfully.
2.1 Hardware configuration
The control of accelerators requires high reliability. We
selected the 10BASE-T net rather 10BASE-2. Compared to10BASE-2, 10BASE-T has the following advantages:
scalability, ease of upgrading to a 100Mbit network, goodfailure separation ( the failure of one node won’t affectother nodes). There are two Ethernet cards in the PC server.
One is connected to the campus LAN of IHEP, throughwhich communication between the central control systemand the Linac local control system is done. The other isconnected to the local control net. The HUB is stackable(3com 3c16670). The PC server is HP LH Plus. As for theEthernet card , we selected Intel’s EEPro 10M .
2.2 Software platform
Windows NT is used as the PC server’s operating
systems. It is more reliable than other PC based network
operating system, such as Novell NetWare or Windows forworkgroup. Visual C++ is selected as softwaredevelopment tool.
2.3 Communication protocol
TCP/IP has been developed since 1970. It is mature andis the international standard for interplatform communication in fact. During implementation, we have onlyone IP address for our seven computers. So we use virtualIP addresses for the front end PCs.
2.4 Programming
Sockets is the communication interface for UNIX. For theWindows platform we have Windows Sockets, which isadapted to the message driven features of Windowsapplications. We use it as our network programming
interface.
2.5 Experiments and results
Experiments have been done to telecontrol the RF phaseadjust system. The program was developed using theclient/server model. The server program runs on theindustrial PCs. It was developed as a program external tothe control program. When messages are sent from client
program on the PC server, the server program will send amessage to the control program. The same messages are
generated from the control program’s operator interface.
The experiments were successful and all programs work
together smoothly.
3 Conclusions
The upgrade of the BEPC Linac control system has been
performed in a step by step manner. First, we built
separated control systems to control separated BEPC Linac
subsytems. Then we networked them together. Everycomponent of the control system is fully tested before it isput into routine operation. Through three years of hard
work by our control group, the whole system is a success.