The Research and Industrialization of an Accelerator Control System forLarge Container on-line Inspection
Hua Li Zhang Huayi
Department of Engineering Physics, Tsinghua University, Beijing 100084 China
E-mail: zhanghy@thinker.ep.tsinghua.edu.cn

Abstract
An economical and practical design of the accelerator
control system for large container on-line inspection
system is presented in this paper. The system consists ofone Pentium computer and one PLC, which are connectedby an RS-232C cable and forward a simple distributedsystem. CSMA/CD protocols are adopted to prevent data
collisions in communication, and Windows95 is employed
as developing platform. In order to improve the response
speed of the system, several analogue modulators are used.

•Scanning: Sample the field data, achieve theprogrammed control, coordinate start, stop and breakdown
detection of the machine.
• Communication: Transmit required data to theinspection station and receive the command from the uppersupervisor.
• Alarm: Identify the status of the machine andoutput an alarm when necessary.

Supervision Station

1 Introduction
A large container inspection system THSCAN usedmainly for customs has been developed by Tsinghua
University in the Eighth Five Year of Science &Technology. It’s high time to industrialize this technology.
As one of the most important parts of the system, the linac
has to be controlled safely, efficiently and easily.
The THL-9 linac consists of the following subsystems: a
9MeV traveling wave accelerator tube, a beam transportsystem which includes an electron gun, focusing andsteering coils and magnetic quadrupole lenses, amicrowave power source and a transmission system, avacuum system, a cooling water and pressing gas system.
After simplification about 86 digital signal channels and22 analogue signal channels needing control.
2 Control system overview
In this system, the number of digital signal channels ismuch larger than that of analogue signal channels. Output
information is less than input information. So we employeda control architecture as shown in Fig. 1.
The Programmable Controller is applied as localcontroller. In this system, we chose CQM1 of OMRON Co.,
Japan. This kind of machine supports Host Links and PC
Links, executes instructions quite quickly (basic executing
time 0.5 µS ), and has a large capacity for programming(7.2K). Above all, it’s very reliable, beautiful and small. APentium computer is used as the inspection station. Bothare connected by an RS-232C cable and form a simple
distributed system. The transmission rate between themcan be adjusted from 1200bps to 19200bps.
The process controller fulfills real time control of thelinac, which is the main task of the setup, and it has
several functions:Inspection Station

Process Controller (LOC)

Executor

Executor

Executor

Fig1. THL-9 Control System Architecture
The Inspection Station is comprised of a Pentiumcomputer, an industrial TV and a stethoscope; Windows95
is selected as developing platform and VB4.0 Enterpriseand VC++4.2 as tools. The operator can inspect themachine from the CRT screen, and debug the machine
dynamically by employing the engineer’s keyboard. It has
functions as follows:• Real time database management: Analyze the data
sent from the local controller, obtain relative information
and respond quickly.
• Graphical display: Display the status of themachine and of some crucial parameters.
• Dynamic debugging: an engineer can debug thesystem dynamically using the keyboard: change the baudrate, the sampling interval, and RS-232C port time; debug
the subsystem one after another; adjust parameters on line;
detect the breakdown.
• Storing Breakdown Information: Analyze thebreakdown code, display and store the breakdown Id andtime.

Man-Machine Interface

CRT

Data Process
DataProcess.cpp

Status Interlock
AnalyStatus.bas

BreakDown
FailureDisposal.bas

Real Time DataBase

Status Flush
FlushSamp

Status Coordinate
StartPLC

InterLock

Breakdown
Detection

Status Coordinate
ReadPLCFig2 Software Architecture of the Control System• Communication: Realize two_direction data flow.
In order to keep the influence of breakdown as small as
possible, the local controller can run independently.
3 Software architecture
In this course of optimization, we improved the software
as well. The improved software structure is shown infigure2. The data of all the subsystems of the machine arescanned and sampled by FlushSamp which runs on the PC,
and the inspection station flushes the data into the realtime database. DataProcess.cpp operates the data anddisplays them on the screen. The operator can type acommand at any time. The control functions are executed
mainly by StartPLC and ReadyPLC.
The real-time database architecture can be described asfollows:
Structure Control_DB{Private:
Char *Channel_Name;Char *Scan_Time;
DataType Channel_Status;
FieldType Field_Name;Char *SubSystem_Name;
Public:void Field_Operator(FieldType *Fin);void Alarm_Detection()
DataOutType Local_OutPut_Document(*);}

To prevent data collisions in communication, weemployed the simplified CSMA/CD protocols tocoordinate the two members of the system. It proved
worthwhile. At the same time, we applied some newtechnologies, such as self-protection and combineddetection, in the programming of the PLC, which improved
the reliability of the system.
4 Conclusions
Today, this system has been tested in field operation. We
find that the man-machine interface was improved
significantly and the machine is more reliable and easier tooperate. We still need improvement in the next thoroughtrial.
Finally, we have to mention the integration of the control
system. From the very beginning, one of the major goals of
this optimization was to achieve miniaturization of thecontrol system. We managed to integrate the control
system in a cabinet, which is as large as three drawers.
Above all, the cost of the system has been reduced
dramatically.
References[1] Gee Smee Poo & Wilson Ang, OSI Protocol Choices
for LAN Environments, Vol13, No1, Jan/Feb, 1990
[2] R.Bailey. “How can operations get applications
software that they want?”, Proc. ICALEPCS’95.