DEVICE CONTROLS OF RCNP RING CYCLOTRON
T. Yamazaki, A. Ando, K. Hosono, T. Itahashi, I. Katayama, M. Kibayashi, S. Kinjo, M. Kondo,
I. Miura, K. Nagayama, T. Noro, T. Saito, A. Shimizu, M. Uraki and H. Ogata
Research Center for Nuclear Physics, Osaka University
Mihogaoka, Ibaraki, Osaka 567, JapanandM. Maruyama and S. Yamada
Accelerator Business Center, Technological Department, Sumitomo Heavy Industries, Ltd.
Soubiraki, Niihama, Ehime 792, Japan
Abstract
A distributed computer control system of the RCNP ring cyclotron has been designed and is at the stage of construction. To control devices the Universal Device Controller module and a software
for the micro-controller in UDC have been developed. The control
system will be assembled in 1990.
Introduction
The RCNP ring cyclotron is now under construction. For thecontrol system of the ring cyclotron, a hierarchical computer system
is adopted. 1l The computers used are a microVAX 3500, a microVAX
II and three RT VAX systems, and they are connected through a
computer network Ethernet. Computers to control experimental apparatuses will be connected to this network in order to perform finetunings of some magnet parameters in beam transport lines according
to experimental conditions in future.
Fig. I shows the schematic diagram of control system. The
first layer of the network consists of a main computer, and performs
man-machine interface and file management. The second layer consists of four sub-computers, and controls subsystem such as magnets,
RF systems, beam transport lines, vacuum systems and cooling systems. The third layer consists of the Universal Device Controllers, andcontrols each device such as power supply and driving motor system.
The basic design of the control system was done in I987. 2) The
detailed design on utilization of the Universal Device Controller anddevice interlock has been almost completed. To measure the magnetic
field of the sector magnets of the ring cyclotron, some power suppliesof the main magnet and the trim coils have been already used with
the Universal Device Controllers in local mode.
Communication between Group Control
Computers and Device Controllers
To control power supplies and motor drived devices, a device
controller is used in each device. These device controllers are linked
to a subcomputer thwugh optical fiber cables, and constitute a distributed control network.
A signal-multiplexed communication system named a message
tree has been developed for the control of accelerators, and is shownin Fig. 2. The message tree is made of an interface board installedin the group control computer named a Message Tree Communicator(MTC), a branch device of the communication signal named a Message
Tree Braucher (MTB) and a controller installed within many devices
named a Universal Device Controller (UDC). Each UDC is connectedto the MTB in a tree configuration.

Message Tree Communicator (MTC)
Fig. 3 shows an MTC board. The MTC is connected to thebus of a host computer. The MTC receives an order message fromthe host computer, and sends it to the designated UDC. The MTC
receives a status message from UDC through MTB, and sends it tothe host computer.
The MTC includes an 8344 micro-controller, two 8k byte ROMs,
six Ik byte dual-port RAMs, CSR (Control Status Register) bus interface, interrupt lines and serial communication interfaces.
The internal RAM region of the 8344 micro-controller consistsof working region and buffers for serial communications. Programsfor the 8344 micro-controller are stored in the ROM region. They
are a communication software between UDC and MTC and a communication software between MTC. External RAM region is divided
into three regions; RAMI region, RAM2 region and a work region.
The RAMI region is a region used by micro-controller and host computer. The host computer writes data into RAMI region. The microcontroller reads the data and sends them to UDC through the serial
communication interface. The RAM2 region is also a region used byhost computer and micro-controller. Micro-controller stores the data
received from UDC, and host computer reads the data later. The work
area is used by micro-controller as a database to manage the status of
UDCs. The CSR is used for the handshake between micro-controller
and host computer.
The message tree uses SDLC (Synchronous Data Link Control)as the data transmission protocol. The message tree has multi-point
half duplex constitution. The MTC is the primary station and theUDCs are the secondary stations.
Message Tree Braucher (MTB)
The Message Tree Braucher (MTB) is a signal distributer, andconnects the MTC and up to 50 UDCs. The MTB receives data from
the MTC, and distributes them to all UDCs connected to the MTB.
Responses from UDCs are received by the MTC through the MTB,
and are written into the dual-port memory RAMI of the MTC.
Universal Device Controller (UDC)
For the easiness of maintenance of the control components interfaces to devices are standardized. For these purposes a Universal
Device Controller (UDC) has been developed. Fig. 4 shows a UDC
board.
In the power supplies of magnet coils of the ring cyclotron andthe beam transport lines and high voltage devices such as the electro-

REMOTE CONTROL STATION

Fig. I Control system of RCNP ring cyclotron

-255-

\

Fig. 2 A signal-multiplex communication system. Message Tree Communicator, Message Tree Brancher and Universal Device Controller.
static channels and the RF system of the ring cyclotron, main functions of the UDCs for the power supplies are periodic operation dataacquisitions, sequence controls within the power supplies, interlock
checks of the power supplies, polarity change, slow up and slow down
controls based on UDC software and preset values, stability checks,
local panel handling, and the communication with the group control
computer.
The present control system uses many stepping motors and AC
motors for the position controls. One UDC controls up to four stepping motors or AC motors, and main functions of the UDCs for thedriving systems are drive controls of motors, periodic position dataacquisitions using drived pulses for stepping motors and using potensiometers for AC motors, stability checks for AC motors, driving speed
changes if necessary for the beam diagnostic devices, local panel handling including position displays and limit switch status displays, andthe communication with the group control computer.
For the beam diagnostic devices both the position controls andthe beam current measurements are necessary. In case of beam slits
in the ring cyclotron and beam transport lines the position settings
and the beam current measurements are generally separated functions. Therefore two independent UDCs perform each function. In
case of beam profile monitors the beam currents must be measured asa function of monitor positions, and single UDC performs both functions. In case of some beam probes such as the main probe to measure
the beam current in the ring cyclotron, there are two modes for theprobe controls. The one is an automatic measurement mode, and thebeam current is measured as a function of monitor position with constant velocity under software control. For this purpose single UDC
performs both functions. The other. is a manual measurement mode,and the beam current is measured at fixed position after an operator
set the probe position manually. For the acquisitions of beam

current values each UDC controls four multiplexers having eight channels, and the gain changes of beam current amplifiers. The UDCs also
have functions of local panel handling and the communication withthe group control computer.
The interfaces and software designs of the UDCs for the vacuum systems and the cooling systems are now in progress. The UDCs
for the vacuum system have some limitted functions from periodic
vacuum data acquisitions, sequence controls of vacuum pumps andvacuum valves, interlock checks in the vacuum systems, local panel
handling and the communication with the group control computer.
The UDCs for the cooling s·ystem have some lirnitted functions fromperiodic temperature and interlock data acquisitions, local panel handling and the communication with the group control computer.
Hardware of UDC
Functions
The UDC contains an eight-bit microcomputer chip 8344, 16k
byte ROM, 8k byte SRAM and related interface chips. For the interfaces to devices, 32-bit digital inputs (DI) and 32-bit digital outputs (DO) are prepared. Moreover 16-bit bidirectional process inputc
outputs (PIO) can be used as inputs or outputs. For the extensionsof input-output devices the UDC has a connector of an Intel iSBX
bus, and it is possible to connect iSBX modules boards such as ADC,DAC and GPIB. In the present control system this extension connector is not used except vacuum system. The ADC is connected to DI
ports, and the DAC is connected to DO ports of the UDC. The GPIB
devices don't use the UDC, and they are connected to the host com~puter directly. The UDC has a serial communication interface with
an optical link connector and a local-panel interface. All input-output
signals except signals for the local panels are isolated by using optical
couplers.
Memories
The memories of the UDC is used as UDC44, USER1, USER2,
USER3 and USER4 regions. The UDC44 is a compact monitor program suitable to the device control. The UDC44 monitor is stored in
the ROM region, and uses both internal RAM region of the microcontroller 8344 and external SRAM region. The USER1 region occupies two bytes of the internal RAM, and both byte access and bit
access are possible for this region. In case of bit access region, user
can treat 16 flags. The USER2 region occupies 16 bytes of the internal
RAM, the byte access is possible for this region. The USER3 region
is prepared in external ROM, and it is·possible for the user programsand data region of fixed values. The USER4 region is prepared inexternal SRAM, and it is possible as work area and program area.
Local Panel Interface
The UDC has a local panel interface for a keyboard and LED
displays. The programmable keyboard/display controller i8279 is usedin this interface.
Software of UDC
The UDC is one component of a distributed control network,
the message tree. The UDC must execute many tasks such as device
controls, communications with the MTC, and interfaces with the local
operator in real time.
For these purpose real-time multitask monitor UDC44 has beendeveloped. Programs to control individual devices can be describedby PL/M language. The UDC44 monitor can execute task controls
and input-output managements by issuing system calls. The UDC44

Fig. 4 Universal Device Controller board

Fig. 3 Message Tree Communicator board-256-monitor is constituted by kernel; BIOS and SIU handler. The BIOS
(Basic Input-Output System) manages communication registers andinput-output ports. The SIU handler (Supervisory-Information- Unnumbered frame handler) manages data. communication of the message tree, and starts by receiving data.
Communication Register (CRG)· The UDC has a memory region of 128 bytes called Communication Register (CRG) on the inner RAM. These CRG data are copied
to the memory of host computer. The contents of CRG are necessary
informations to control and manage the devices, that is, commands,
data and status. Each byte and bit of the CRG is determined uniquely
for each UDC.
By introducing the concept of CRG an application program of
a UDC is connected to an application program of a host computer
by CRG, SIU handler in UDC, Message Tree Brancher (MTB), SIU
handler and two-port RAM in MTC, and MTC handler and CRG
image in host computer. A local panel handler (Local Input-Output
Handler, LIO) in UDC is also specific to each device like application
program.
UDC44 Kernel
The UDC44 monitor can manage up to eight tasks including
SIU handler. The number of priority level of tasks on UDC44 monitor
is eight that is equa,l to the number of tasks, and the priority of the
SIU handler is fixed to the second level. The status of tasks in UDC isentry, ready, wait or run status. A created task is in entry state. The
starting period and the starting address are registered at this time.
This task moves to ready state in each registered period. After othertask having higher priority in run state moves to entry state, the task
having the highest priority in ready state moves to run state. The
task in run state occupies the processor. When a. task having higher
priofity moves to ready state, the task having lower priority in run
state moves to ready state. The task in run state can move to waitstate, and after preset waiting time this task moves from wait state
to ready state. The task in run state can also move to entry state.
UDC44 BIOS
The UDC44 BIOS manages Communication Register (CRG)
and input-output port. A task in UDC executes specific job respectively. However, the contents of the tasks can be classified to thefollowing two functions. The first function is inputs from CRG, processings and outputs to CRG or output ports. The second function is
inputs from input ports, processings and outputs to CRG or output
ports. In order to inhibit an interruption by higher priority tasks during an access by lower· priority tasks to CRG and input-output ports,
application programs must use the system calls for the managementsof CRG and input-output potrs.
UDC44 SIU Handler
The SIU Handler (Handler for Supervisory, Information and
Unnumbered frames) manages the communications in the messagetree.
The message tree constitutes a multipoint semiduplex configuration. The Message Tree Communicator (MTC) is the primarystation and Universal Device Controllers (UDC) are the secondary
stations. The primary station (MTC) always sends a command to
the secondary stations (UDC), and then the secondary stations send
responses to the primary station. The transmission protocol of themessage tree is synchronous data link control (SDLC).

The fra.m~s of SDLC used in the message tree are classified tothe information frame, the supervisory frame and the unnumberedframe. The jnformation frame is used to send and receive informations including commands, responses, CRG data. and other data accompanying starting address. The supervisory frame is used for RR(Receive Ready) and RNR (Receive Not Ready) commands. The unnumbered frame is used for DISC (Disconnect), SNRM (Set Normal
Response Mode), UA (Unnumbered Acknowledgement) and FRMR
(Frame Reject) commands.
Control Unit and Local Panel
The Universal Device Controller, interface boards, interlock relay boards and local panels are installed in a control unit. This control
unit is installed in cabinet of a power supply or a control module ofdriving motors. To avoid the radiation damage of the Universal Device Controller boards, the control unit is usually installed far fromthe cyclotron vault and beam tra.nsort lines.
Fig. 5 shows a control unit for a power supply. This control
unit contains a common local panel and only one individual panel.
Some power supply such as quadrupole magnet power supply cancontrol many magnet currents, and many control units are installedin the cabinet of the power supply. The first control unit can installcommon local panel, up to three individual local panels and up to
three Universal Device Controllers. The· second and subsequent control units have no common local panel, _and can install up to fourindividual local panels and up to four Universal Device Controllers.
The control programs constitute setting value output task, sequence control task and man-machine interface task. These tasks execute parameter changes for the setting values of power supply, alarm
display, status and data. display of communication registers (CRG)
and input-output ports, the monitoring of stability of power supplies
and device interlocks.
Interlock System
In order to minimize the device damages in case of emergency,
reliability and speed are required for the actions of the device interlocks. For this purpose the present control system can be designedwith the double structure interlock system consisting of both hardware and software interlocks. The device interlocks generally consistof internal interlocks managed by the conditions within the device
itself and external interlocks determined by external conditions. For
the internal interlocks the UDC acquires corresponding status informations periodically. The external hardware interlock system consistsof relay circuits. They cover important items which directly conecct
to the damage of devices or necessary items on the local operation.
In case of external software interlock system the group control computer, that takes charge of each UDC, acquires the interlock data at
an interval of about lOOms periodically and performs the interlock
checks. When the group control computer finds a fault status for a.
device, corresponding fault sequence program including the softwareinterlock management starts.
Some examples of the software interlocks are stabilities of theoutput currents of the magnet power supplies, stabilities of the output
voltages of the electrostatic channels power suuplies at injection andextraction systems, stabilities of the cavity voltages of the RF systems,
and beam current values which exceed the predetermined thresholdvalues. Many software interlock items are used as a closing conditionof the beam stoppers in the injection beam line before the entranceof the ring cyclotron.
Conclusion
The message tree including the Message Tree Communicator,
the Message Tree Brancher and the Universal Device Controller has
been developed. Simultaneous controls of many devices have been realized with the distributed control functions to the Universal Device
Controllers. The formats of the communication registers in the Universal Device Controllers have been almost determined. The designof the interlock systems is now in progress. The control system is at
the stage of construction, and will be completed in 1990.
References
1) T.Yamazaki, et a!., Design of Distributed Control System for
the RCNP Ring Cyclotron, Proc. Twelfth Inti. Conf. on Cyclotrons and Their Applications, Berlin(West) Germany, 1989.
2) T.Yamazaki,_ et a!., Design of Control System for RCNP Ring
Cyclotron, Proc. Sixth Symp. on Accelerator Science and Technology, Tokyo, 1987, pp.251-252.

Fig. 5 Control unit for the main coil power supply-257-