THE CONTROL SYSTEM FOR HIRFL
Tuanhua Huang
Institute of Modern Physics, Academia Sinica
Lanzhou, Gansu, 730000
The People's Republic of ChinaI

INTRODUCTION

The Heavy Ion Research Facility in Lanzhou (HIRFL) consists of an Electron Cyclotron
Resonance (ECR) ion source, a Sector Focusing Cyclotron (SFC), a Separated Sector Cyclotron (SSC), and8 experimental terminals; there are 3 beam transport lines to link them. The subsystems of the HIRFL
control system are divided in a corresponding manner [Figure 1].

Basically the HIRFL control system may be divided into two parts - the SFC control part and the SSC control
part. The main engineering construction of the subsystems in the SSC control part was finished by 1988 before thefirst ion beam was successfully extracted from the SSC. These subsystems had primarily been used for beam tuning for
4 years. The main engineering construction of the SFC control part was put into use by April 1992, not long after theend of construction of the ECR ion source and upgrade of the SFC.
The centralization of SSC control was completed in 1993 and is now functional and stable (Figure 2)

II

SUB-CONTROL-SYSTEMS IN SSC CONTROLSThe subsystems in the SSC control part are described as follows:

1. Power supply control for SSC magnets
This subsystem consists of a CAMAC crate with I/O modules connected to circuits in NIM crates. One
NIM crate is located near the CAMAC crate and the others are near the power supplies. The circuits in the NIM
crates are multiplexers for adjusting and measuring the currents of the power supplies, and for switching andmonitoring them. DACs and voltmeters are employed in adjusting and measuring channels.

2. Control of SSC injection and extraction elements
In the control room ER16VM modules are located in a CAMAC crate. At the sites of the injection andextraction devices there are NIM crates with circuits to perform adjusting and measuring of the currents (or voltages)
via DACs and ADCs, and to perform switching and state monitoring of the power supplies. Also performed areposition adjustments and the alarms and interlocks for cooling water in these elements.
3. Power supply control for the beam lines from SFC to SSC and from SSC to the 8 experimental terminals
A CAMAC crate linked to a VAX8350 is employed to operate the CAMAC sub-serial loop via a 3992
serial highway driver and a 3936 U-port. There are 4 CAMAC crates near the power supplies on the sub-serialloop. The I/O modules in these crates connect to the circuits in NIM crates inside the power supply enclosures
to perform adjustment and measurement of the currents, and for switching and monitoring power supply states.
4. The beam diagnostic subsystem in the beam lines from SFC to SSC and from SSC to the 8 experimentalterminals
The beam diagnostic elements, such as multiwire chambers, Faraday cups, slits and phase probe units
are connected to circuits in NIM crates, and then to I/O modules of 6 CAMAC crates distributed on the sites ofthe beam lines. All the crates are linked as a sub-serial loop to the control room where a T&W computer isemployed as a front end. A 3922 crate controller is used as an Auxiliary Crate Controller (ACC) whichconnects to a T&W microcomputer, and a 3952 is used as a Main Crate Controller (MCC) which connectswith the central VAX8350. A 3821 memory module is included to act as a mailbox linking the two computers,
VAX8350 and T&W. In this way the centralization of subsystems with PCs is realized.
5. Beam diagnostic subsystem in the SSC
In the control room an IBM PC/AT computer is connected to a CAMAC crate via a crate controller. A
3992 CAMAC serial highway driver in the crate drives a serial loop which links 2 CAMAC crates in the SSC
hall. Some I/O modules in the 2 crates link to circuits in NIM crates where the signals from the SSC beamdiagnostic elements, such as radial differential probes, Faraday cups and position probes, are gathered and themotion control signals to these probes are sent. This subsystem will be centralized through the VAX8350 via thesame mechanism described in 4 above.
6. The fire alarm and security interlock system
Smoke detectors are distributed throughout the whole of HIRFL. They are all connected to the control room
where alarms will be heard. For safety of both personnel and hardware, an interlock system was constructed for all
HIRFL, and its status will be displayed on the central console.

7. RF control and vacuum control
RF and vacuum are controlled by a CAMAC system run from a PC. They once worked independently,
but will be centralized and operated from the console.
8. Others
Cooling and ventilation control run independently in a traditional style. They also will be connected toand shown on the console.

IIISFC CONTROLSIn the SFC control room there is a console which consists of an AT&T 6386/25 computer, 2 touch
panels, 2 color monitors, a storage oscilloscope, etc. and a CAMAC crate which is connected to the computer
via a 2925 module and a 3920 crate controller. In the CAMAC crate are modules to operate the devices in theconsole, and a 3992 serial highway driver and a 3936 U-port to drive a CAMAC loop, with 4 crates distributedon the sites where the controlled devices are located. The CAMAC modules in 4 crates operate the devices via
circuits in NIM crates and designed by our staff.
The functions of SFC control include:
1. ECR ion source control
2. Power supply control for the beam line from ECR to SFC
3. Power supply control for the SFC
4. Position control for injection and extraction in SFC
5. Beam diagnostics in the beam line from ECR to SFC
6. Beam diagnostics in the SFC
The circuits for ECR ion source control and power supply control were designed similarly, while those forposition control for injection and extraction are different. The beam diagnostic subsystems are similar to those in
the SSC control part and temporarily use an IBM PC/AT computer rather than the AT&T one. The SFC console
has not been used as yet except for the AT&T computer.
The operating programs to perform the 6 listed functions are written in FORTRAN and run separately on
two computers.

IVCENTRALIZED CONTROLTwo VAX8350s are clustered as the central computers for HIRFL control. There is a CAMAC parallel
and a JY411 serial driver in the SSC control room. The JY411 drives several CAMAC crates to link all theSSC sub-control-systems. Three subsystems for power supply control are linked without microcomputers, andthe 2 sub-control-systems of beam diagnostics are linked with them; communication between VAX8350 andmicrocomputer is via CAMAC dataway as explained above.
In the SSC control room there is a console with 6 touch panels, 6 color monitors, 6 displays, a storage
oscilloscope and a TV. A VAX8350 links touch panels via a DZ-11 interface, and monitors and displays via a DR11 and a GMR-27 controller; thus we may operate the SSC control system on this console. In 1993, after having
done preparatory work, the sub-control-systems were connected into the central computer and the operation of theSSC was moved to the console. All the data sent out to operate SSC devices come from the touch panels. The 6sets of panels, color monitors and displays are functionally the same, which is convenient for operation. The TV
runs independently to look at specific sites of HIRFL while the facility is being operated.
The VAX8350 and PCs will be linked by Ethernet (Figure 3). Communication between them via the DECnetVAX and DECnet-DOS transparent task-to-task technique has been undertaken. The console for SSC control
will be used for the whole HIRFL control system when communication between SFC and SSC controls via
Ethernet/DECnet is completed.

VSOFTWARE

The operating programs of HIRFL consist of two parts, one for operating the sub-control-systems andanother for operating the console devices. Most of the programs are written in FORTRAN developed on
VAX/VMS 4.5, some are in MACRO and new ones in C. In order to access CAMAC circuitry easily, theCAMAC software package developed by the Fermilab controls group was used.
The operating program of each sub-control-system was written by our staff member who was responsible
for that subsystem itself. The programs had been run separately for several years.

The operating programs for console devices can be divided into two - manager programs and displaycontrol programs. They are developed by our staff, and are convenient for linking existing operating programs ofsub-systems by a variety of techniques.
In order to perform centralized operation on the console, the following steps are taken:
1. Run the console management program to select touch panel and color display, to select the sub-system under control
and to operate the touch panel as if operating on a keyboard.
2. Set up sharable memory for data and status commands. The central management program and sub-system programs
equally access it by calling subroutines to exchange the operating information; they do not influence each other.
3. Run the start-up program to make all the applications active processes by DCL commands. Thus the whole system
is put into service.