KEK POSITRON GENERATOR CONTROL SYSTEM DESIGN
K. Nakahara, I. Abe, A. Enomoto, Y. Otake and T. Urano
National Laboratory for High Energy Physics
Oho-machi, Tsukuba-gun, Ibaraki-ken, 305, Japan
ABSTRACT

from the PF linac system as a result of recent technical innovations for microelectronics.
The PF linac control system 1 has six subcontrol
stations placed at intervals of 80 m along the linac.
Every subcontrol station consists of a minicomputerwith a general-purpose operating system, a CAMAC crateand subcontrol panels with voltage and current meters,
status indicating lamps, switches, etc. connected tovarious terminal equipments by hard-wiring.
In contrast with this system, the positron generator subcontrol station is composed of a multi-microprocessor
controlled CAMAC system and a local operator's consolewith five graphic display terminals.
This subsystem
has no 'central processor' like a minicomputer in thePF linac; that is a completely distributed processing
system with many single-task-executing microprocessors.
An outstanding feature of a multi-processor system,
where every processor executes only one task, issimpleness of the software; any complicated multitasking operating system can be excluded.
Figure 1
shows a simplified block diagram of the positron
generator control system.

The control system of the KEK positron generator
was designed to be composed of a multi-microprocessor
controlled CAMAC system, local controllers built interminal
equipments,
fiber
opticscommunication
circuits and a local operator's console simplified byintroducing five sets of personal computers.
INTRODUCTION
The general principle for the KEK positron generator control system construction is the same as that for
the Photon Factory (PF) 2.5 GeV electron linac: Autonomous operation capability of every terminal equipment(klystron modulators, magnet power supplies, etc.), acompletely hard-wired logic safety interlock system,
system construction with easily replaceable modules andreal-time remote control through computerized communication system with noise-free fiber optics.
The positron generator (an electron linac) is tobe controlled by a newly designed multi-microprocessor
CAMAC complex system which forms one of subcontrol
stations of the PF linac. The positron generator isrequired to be operable independently of the PF linac;
it is matter of course that the new subsystem isdesigned to be also operable from the PF linac main
operator's console.
All functions of the positron
generator operation are concentrated in a subcontrol
room with an area of 4.8 x 8 m2 situated at the south
end of the positron generator building.
The basic design of the communication system forthe positron generator control is the same as that for
the PF linac; however a subcontrol station for thepositron generator is designed to be fairly different

SUBCONTROL STATIONFOR POSITRON GENERATORCOMMUNICATION SYSTEM
Communications between the subcontrol station andterminal equipments are made in the same way as the PF
linac communication system.
Two kinds of bit serial
communication loops are used: One is 'LOOP-II' with a500 kbps synchronous transmission mode based on theHigh-level Data Link Control procedure (HDLC), and theother is 'LOOP-III' with a 48 kbps asynchronous transmission mode based on the Basic Mode procedure where atransparent mode protocol is adopted to transmit binary
data.

LOOP-ill

LOOP-ill for VACUUM SYSTEM------1~---------------------1I
I
I
I

I
I
I
I
I

I

LOOP-ill for BEM1 TRANSPORT SYSTEM

I

I
I

I

CAMAC

III

I

I

I

I

I

I
I
I
I
I

III
IMAIN
OPERATOR'SCONSOLEMELCOM70/30~p: Microprocessor.
SHB : Subharmonic buncher.
~ : Optical transceivers interconnectedwith optical fiber.

PF LINAC
CONTROL SYSTEM

MAIN CONTROL STATION

Fig. 1

Positron generator control system block diagram.
352

and CAMAC reduces throughput of the control system.
The present multi-microproc essor CAMAC system is, however, a compromize between a simple multi-SBC system
and a CAMAC system with single-micropro cessor auxiliary
controllers, since most of the CAMAC modules required
for the present system construction have already beendeveloped for the PF linac.
Figure 2 shows a block diagram of the system
Table 1 lists
adopted for the subcontrol station.
CAMAC modules contained in two crates. Some of them
are described below.
This single width
Auxiliary crate controller
module was originally designed for a 6800 type 8-bit
microprocessor; it is, however, applicable to othertype microprocessors by making adequate bus buffer
circuits. In the present system, this auxiliary controller is also applied to a 68000 microprocessor
system. Buffered bus lines of the microprocessor areextended directly to the auxiliary controller. Thiscontroller has also a 24-bit LAM mask register and a
direct memory access (DMA) control line.
By setInterrupt request register CAMAC moduleting a bit in this register, one processor can request
another processor to read information written in memoryof a RAM module. The request signal is outputted to aLEMO-type connector on the front panel, and then it is
inputted to an auxiliary controller front panel connector. Four auxiliary controllers can be served by
one interrupt request register module.
The multi-SBC system is constructed with commercially available single board computers and someThe SBC
circuit boards designed in the laboratory.
boards are H680SBC series family boards made by
Hitachi, Ltd. The principal features are as follows:
SBC Four boards with 16-bit microprocessor 68000
are used; each of them executes one of the following
tasks: system monitor, traffic control of communicaterminal surveillance and graphic display
tion,control. An on-board I/O port is utilized to receive
an interrupt signal issued by another SBC through aninterrupt request register board.
Common memory This is a 512 kByte board composedof 18 packages of 256 kbit dynamic RAM.
interrupt
AnInterrupt request register board
signal from an SBC to another SBC within the multi-SBC
system is relayed through this board.
Two sets of single 8-bit 6800 SBC's are connected
to auxiliary controllers in order to read panel switches and to handle UP/DOWN signals for magnet current
change, rf phase adjustment, etc. The UP/DOWN signal
is generated by rotating manually a rotary encoder on
the local console or transmitted from the main
operator's console through a LOOP-III communicationline.
New system programs for 16-bit microprocessors aredeveloped on the target system using SUPER-PL/H (a PL/I
like language) and FORTRAN-77 compilers3; these run on
the CP/M-68K operating system 4 • The real-time program
can be executed independently of CP/M-68K. Most pro-

The communication control unit (CCU) utilized in
the subcontrol station is a microprocessor- controlled
CAMAC module developed for the PF linac control. Thesame type modules for the LOOP-II are used for communications between the main control station and subcontrol station; the firmware built in the module ismodified so as to support a secondary station function.
Control system operation experience of the PF
linac has demonstrated that fiber optics is much effective to avoid electronic circuit malfunction in very
The positron generator control
noisy environment.
system follows the same way as the fiber optics communication system of the PF linac; the optical transceiver is modified only a little.
MULTI-MICROPROCESSOR CAMAC SYSTEM
According to operation experience of the PF linac
control system, a commercially available generalpurpose multi-tasking minicomputer used in the PF linac
subcontrol system is unsatisfactory as the followings:-- Heavy overhead of the large operating system is themain reason for reducing an effective signalling rateof real-time data transfer between the main operator's
console and terminal equipments via the minicomputers.
This weakens 'real-time feel' for operators.
-- A large general-purpose operating system is a black
This makes it difficult tobox for computer users.
modify the operating system even for a little improvement.
Great progress in the microprocessor production
technology has made it possible to overcome easily
A solution to them is a multithese difficulties.
microprocessor system in which each microprocessor
executes only one task. Every task is always in therunning state; this much improves throughput of theNo complicated large operating system issystem.
The software becomes
needed for the target system.
very simple and is easily made; no skillful programing
In contrast with this multitechnique is needed.
microprocessor system, several tasks run essentially inseries in a multi-tasking single processor system which
reduces system.throughp ut.
The multiple single-tasking-m icroprocessor system
can be formed with two architectural method: One is a
CAMAC system with multiple auxiliary crate controllers2, and the other is several single-board-com puters(SBC) interconnected with a common microprocessor bus.
The latter is called multi-SBC system.
The CAMAC dataway is not suitable for random
access to common memory with large space through which
processors interchange information each other; therefore the multi-microproc essor system is not constructed
only with CAMAC auxiliary controllers each of which has
only one microprocessor.
On the contrary, it is also an idea to construct
the whole system only with SBC family boards; it seems
rather preferable as compared with a complex system
including CAMAC, because the bus conversion betweep SBC

Table 1
List of CAMAC modules contained in two crates used in the subcontrol station.
Module nameCrate controller
in minimum configuration

Width/module

Number ofmodules

22

Defined in ref. 2222

Defined in ref. 2Interrupt. request between auxiliary controllers
2 kW/block x 4 blocks

55232500 kbps synchronous communication control unit
48 kbps synchronous communication control unit
Count pulses from a rotary encoder and generate LAM
Coaxial switching, beam monitor control
For debugging and maintenance.

Auxiliary controller
Interrupt request register
RAM (Rundom Access Memory)
CCU (LOOP-II)
CCU (LOOP-III)
Rotary encoder input
Output register
Dataway display

22
1
1353

Remarks

,-------------------------------------------------------~I

LOCAL OPERATOR'S CONSOLE!
!

!
II0----------------------------~----------- -----------------------------1!
!
CAMAC DATAWAYIIIIIIII'III~-------------------------------------------------~
SBC
Single Board Computer
I ACC Auxiliary Crate Controller__________________ j
CCUCommunication Control Unit for LOOP-IT ,-ill!

Fig. 2 Block diagram of the multi-microprocessor-CAMAC system for the positron generator.
Rotary Encoders
Beam focusing and steering
magnet current and rf phase in accelerator guides canbe controlled by rotary encoders on the operator'sconsole.
Number of pulses corresponding to rotation
angle is counted by a CAMAC rotary encoder input moduleand transmitted to selected terminal equipments every
100 ms, if number of counts is not zero.
TV Monitors
Four 9" black/white TV monitors are
installed in the console cabinets to observe beam profile on alumina screens and to display other pictures.
Twenty sets of TV cameras can be switched by the subcontrol processor through a CAMAC output register.
Switch PanelA few hard-wired switches are used
for safety interlock and the gun control to keep highreliability.

grams are written in S-:-PL/H, and some programs arecopied from the PF linac control program for minicomputers written in FORTRAN-77. Load modules are written
in UV-EPROM' s (Ultra-Violet-Erasable Programable Read
Exclusive
Only Memory) and mounted on SBC boards.
usage control of resources can easily be made by 'TESTAND SET' instruction of the 68000 microprocessor.
For system debugging, a test program can be loaded
from a floppy disk into common memory on which theprogram is executed.
Programs for 8 bit SBC's are written in an assembly language and PL/H.
LOCAL OPERATOR'S CONSOLE
The local operator's console in the positron
generator subcontrol station is composed of five setsof graphic displays with light pens, two rotary encoders, a few hard-wired switches, etc. as follows.
Graphic Display
Current mass
production ofpersonal computers enables to construct a highperformance and low-cost graphic display system.
A
low-end personal computer applicable to the linac
control can be purchased at a considerably low price ascompared with an advanced graphic display for CAD andCAM.
The drawing spe.ed in the personal computer istolerable except for a few applications like a beam
current display in real time. Pictures for every kindof terminal equipments are programed in every personal
computer in a BASIC language, and displayed on a CRT
screen by executing the BASIC interpreter. This outstandingly facilitates ease of programing.
In thelocal operator's console for the positron generator,
five sets of personal computers FM-11 with light pens
are used to present information and to input control
commands. Pictures are displayed on 14" color CRT's
with the resolution of 640 x 400 dots. Four sets ofthem are built in the operator's console cabinets, andone set with a 10 MB hard disk unit is used on a working desk for program development and terminal equipment
test. The message interchange between the sub control
processor and those personal computers are performed ina hand-shake mode through 4800 bps asynchronous communication lines.

SUMMARY
Positron generator operation with graphic displays, light pens and rotary encoders is acceptable forthe operators who have been experienced in operation ofsuch,a system in the PF linac. Personal computers aremuch useful as graphic display terminals in which
picture display programs are executed by an interpreter.
The multi-microprocessor system is adequate tocontrol linear accelerators; it is flexible and caneasily be constructed. No complicated operating system
is needed for the real-time system.
The positron generator control system will beready for operation by the end of FY 1984.
REFERENCES
1.
2.
3.
4.

354

K. Nakahara et al., Proc. 4th Symp. on Accel. Sci.
and Technol., Saitama, 1982, 355.
'Multiple controllers in a CAMAC Crate', EUR 6500e(1978).
'Language Manual for 68000 SUPER-PL/H', (Hitachi,Ltd., 1981), CP/M-68K SUPER-PL/H User's Manual',(Hitachi, Ltd., 1983).
'CP/M-68K Operating System User's Guide', (DigitalReseach, 1983).