HIRFL PC-based distributed control system
Huang Xinmin, Chu zhensheng and Gao weizheng
Institute of Modern Physics, Chinese Academy of Sciences
P.O.Box 31, Lanzhou 730000,ChinaAbstract

2 SYSTEM UPGRADE

A centralized control system in which a VAX/8350
computer was used ran before 1996. The rebuilt HIRFL
control system is a distributed one based on the powerful
PC, workstation and server. It consists of someindependent subsystems: Ion source control station, SFC
control station, SFC beam diagnosis station, SSC power
control station, SSC beam diagnosis station, SSC vacuum
control station and RF control station. A high-speed
network, 100M, is used to communicate between controlstations. The windows socket is used in network
programming. The application programs that are used tocontrol equipment are written in C or C++ . They arelinked into a DDL(dynamic linking library) which iscalled by the standard window applications. The GUI is
programmed in OOP programming language C++ or VB
and run under Windows/95 Chinese version(next:Windows/ NT). The system was built in 1996 andcompleted in 1998.

1 INTRODUCTIONHIRFL control system before 1996 was a centralizedcontrol system. A VAX/8350 computer was used as acenter control machine and only used to control SSC
power supplies. The computer had some trouble in someyears and its spare parts are very difficult to buy since
VAX/8350 is old type. In order to insure the accelerator
operating, we have decided to upgrade the control system.
A new HIRFL control system is rebuilt. It is based on ahigh grade PC workstation and server and a DCS control
system. Fig.1 shows the control system network.
It is two level control architecture. The upper levelconsists of Central Manage Workstation, server (CMW),Local Control Workstations (LCW) and a high-speed
network, 100M, is used to interconnect them. The Local
Control Workstations (LCW) consist of ECR Ion Source
Control Workstation (ECR-CW), SFC, injector, Control
Workstations (SFC-CW), SFC Diagnosis Workstation(SFC-DW), Technical Control Workstation (TCW), Radio
Frequency Control Workstations (RFCW), SSC Power
Supply Control Workstations (SSC-PSCW), SSC
Diagnosis Workstation (SSC-DW) and Vacuum Control
Workstation (VCW). The lower level consists ofCAMAC series loops which were used to control
equipment, IPC and Field Bus.

2.1 Hardware upgrade
The old computers, VAX/8350, IBM PC/XT, 286 andIBM PC/AT, are replaced into HP Pentium 586/200,
petum2/300M workstations and servers because they arevery difficult to run a high-speed network.

2.2 Computer Network
A Fast Ethernet is used in HIRFL control system. The
Inter express 100M HUBs and Switch are used in thenetwork. The 3COM’s 3C905 100M PCI network adapter
is used in each PC workstation and the AMP type 5 cable
is used to interconnect between PC workstation and HUB.
In order to insure the correct transport, the cable Max.
distance is limited to 90M.

3 INTERFACE AND BUS
3.1 CAMAC
Some CAMAC series loops are still used in somecontrol stations since there were many CAMAC crates
and modules in HIRFL control system. The CAMAC
power supply controllers which are developed by control
group have been used to control over 200 magnet power
supplies.

3.2 IPC
IPC (Industry PC) is used in Vacuum Control
Workstation (VCW).

3.3 Fieldbus
A new Field bus control system (FCS) will be used inthe ECR Ion Source Control Workstation (ECR-CW).
There are some Fieldbuses to be selected, CAN,LONWorks, profibus, Wordfip and so on. CAN is the first
choice for HIRFL control system. The Intelligent
Equipment Controller (IEC) will be used in the front endsof FCS. (Fig.3 )Server 1

Server N

WS 1

WS N

User 1

User N

Rfcw

Tcw

100MNetwork (LAN)ECR_CW PC

CANAdapter

Sfc-cw Sfc-cmw Sfc-dw

CAMACcrate1

SSC-dw

SSC-pscw

SSC-cmw

Vcw(IPC)

CAMACcrate1 Eq.

Eq.

CANbusCAN
controller
IEC

CAN
controller

CAMACcrate2

CAMACcrate2

CAMACcrate N

CAMACcrate N

IEC

Fig.1 Control system network

4 SOFTWARE REBUILDING
4. 1 Application programs in LCWApplications in LCW are written in C or C++. All
subroutines have a uniform format, such as subroutinename (input parameter 1, input parameter 2,outputparameter 1,output parameter 2). All the subroutines arelinked, in C++ V4.5 development kit, into a Dynamic
Link Library, naming as ECR_CON.DLL for ECR control,
SFC_CON.DLL for SFC control, SSC_CON.DLL for
SSC power supply control, RF_CON.DLL for RF control,
SFC_DIA.DLL for SFC Diagnosis, SSC_DIA.DLL for
SSC Diagnosis and VAC.DLL for vacuum control andmonitor. All DLLs are storied under the windows/system
sub-directory and are called by The Man MachineInterface (MMI) in running time.

4.2 MMI software
The MMI for the control system is a standard Microsoft
Windows interface, programming in visual basic V4.0 andvisual C++. It runs under the Windows/95 Chineseversion and is operated by a mouse. The multimedia
technique is used in the control system to provide the online voice help and the equipment operating state
information.

4.3 Communication software
The winsock is used to communicate between controlstations.

4.4 Database
Some databases are suitable for Accelerator control
system, such as Oracle, Sybase, DB2 and MS SQL server.
The Microsoft SQL server is a good database, which issuitable for windows/95 and windows/NT. The HIRFLDB
which is developed in MS SQL server is used in HIRFL
control system.

5 CONTROL ROOM
There are two control rooms in HIRFL control system,
SFC control room (injector control room) and SSC controlroom. The SFC control room can independently operate inorder to extract Ion beam to experiment. There are 3-4 20inch high-resolution color displays located on the SFC
control desk and 6 20-inch high resolution color displays
located on the SSC control desk. The LCD Projector,
Panasonic PT-595E, with high luminance, high-density
and high-quality pictures is used to monitor theAccelerator operating status and display the beam
parameters. The 100 inches screen is very convenient forthe operators.

6 CONCLUSION
The hardware upgrading in HIRFL has been finished.
Application programs in LCW have been completed andhave been used to control equipment. The MMI software
has finished and runs under Windows/95.
Many new programming techniques, such as OOP,OLE, DDE, DLL, COM, DCOM and so on, have beenused and a very friendly user interface, GUI, has been
supplied (Fig.2). The computer network is running very
well. The severs are going to put into use and the threelayers sever/client construction will be realized.
Multimedia technique has being improved the control
system. The CAMAC will be replaced step by step. The
DCS will be substituted for a new Fieldbus Control
System (FCS).

Fig.2 The User Interface on SFC-CWCAN BUS

CAN controller

Memory

I/O

DAC

AO

ADC

AI

DI/(Buffer)

DI

DO/(Buffer)

DO

Interrupt
Controller

Interrupt
Sources

CPUINT I/O

Fig.3

IECStructure