Introduction

Heavy Ion Research Facility of Lanzhou (HIRFL) is an accelerator complex with general-purpose, whose research field includes high energy density physics, atomic physics, super-heavy elements synthesis, radioactive ion beam physics, heavy ion physics and cancer therapy [1]. As an important part of the accelerator, the ion pump control system is built to provide ultra-high vacuum conditions for stable particle beam operation. The control system must manage multiple devices, which are distributed around the accelerator beam line, precisely and efficiently to meet various physical requirements. In order to realize the remote control and data acquisition of the ion pump controller, an ion pump control system is designed based on EPICS (Experimental Physics and Industrial Control System). In the paper, the progress of the control system framework is discussed to upgrade the data acquisition and control characteristics for ion pump controller. The database based on MySQL [2, 3] is developed to store the voltage and current values of the ion pump power supply. Details of the system structure, interlocking protection, main test results and resulting analysis are described in the following sections.

Hardware system design

High vacuum is one of the necessary conditions for the stable operation of accelerator. As one of the main pumps of the vacuum system, the ion pump has been used sputter burial to extract the remaining gas to make the pressure of the vacuum pipeline up to 10−9 Pa. Ion pump control system consists of PLC, ion pump power and bus module. The ion pump power used in the system is the SP series provided by Shanghai Mitsui Vacuum Equipment Co., Ltd [4]. The system architecture of the ion pump control system is shown in Fig. 1. Therefore, the related devices can be directly controlled and monitored with intranet or the RS232 port.

Fig. 1
figure 1

Hardware connection diagram of the system

The system is designed with industrial PLC for data acquisition and equipment control, which could improve the scalability and maintainability of the system. At the same time, it is easy to expand and maintain according to the distribution characteristics of on-site equipment. BeckHoff [5] CX2020 compact controllers are used in the system, which has the characteristics of strong anti-interference ability, stable operation and reliable structure. Figure 2 shows the hardware layout diagram of the ion pump control system.

Fig. 2
figure 2

Hardware layout diagram of the system

Software architecture design

The control software includes four parts, operation interface (OPI), input output controller (IOC), data archiving (DA) and device controller (DC). The OPI corresponds to remote monitoring, IOC to server control, DC to field control and DA to database management. These four sections reflect the hierarchical structure of the control system. The control architecture is able to extend the system functions and upgrading devices. The server control layers play an important role in the system. The Modbus/TCP protocol is utilized for data transmission, and MySQL is used to data archive and process. The network interconnects all the control device and monitors the parameters of the system to get an optimum status. Software development platform adopts EPICS, which is a set of applications tools, libraries and open source software tools developed collaboratively and used worldwide to create distributed soft real-time control systems for scientific instruments such as telescopes, particle accelerators and other large scientific experiments [6, 7]. Figure 3 shows the operation interface of the ion pump control system.

Fig. 3
figure 3

The OPI of the ion pump control system

Data communication

The ion pump control system of HIRFL is based on BeckHoff embedded PC series CX2020 PLC controller and EtherCAT field-bus technology. PLC is used as a control layer to receive and analyze control commands and manage the ion pump controller. I/O module EL6001/6002 is adopted for data and command transmission with RS232 interface. Dozens of instructions are provided by the communication protocol such as switching control modes, remote reset, status reading and parameter query. Control instructions are sent in standard ASCII code. The communication protocol of the ion pump controller is shown in Table 1.

Table 1 Communication protocol for controller of ion pump

The data interaction between PLC and user interface and database is completed by IOC. Device driver is the core program in IOC, which can realize the data acquisition and data conversion between hardware device and the record of IOC. The device driver [8] in the system is the design of interface program between PLC and IOC, which is mainly composed of record support, driver support and device support. Four data types including BI (Binary Input), BO (Binary Output), AI (Analog Input), and AO (Analog Output) of the IOC record type are used for the data acquisition of PLC. The codes implemented of the four data types includes AI, AO, BI, and BO in the DBD files are as follows:

device (bi, INST_IO, devBiPlcBeckhoff, “Bi_PLC_BeckHoff”)

device (bo, INST_IO, devBoPlcBeckhoff, “Bo_PLC_BeckHoff”)

device (ai, INST_IO, devAiPlcBeckhoff, “Ai_PLC_BeckHoff”)

device (ao, INST_IO, devAoPlcBeckhoff, “Ao_PLC_BeckHoff”)

Driver support includes the writing of initialization functions and reading functions. The initialization function is mainly for domain processing. The processing of the INP domain is the analysis of the PLC address and the controller address. The reading function realizes the acquisition of PLC memory data and I/O data.

Interlocking and protection

When the accelerator is running, the failure of any equipment in the system will cause the instability of the vacuum degree, which would cause the loss of the particle beam and seriously damage the equipment. An “interlock protection” module is added to the control system, the function is to protect the field equipment and ensure the stable operation of the vacuum system. The interlock protection (IP) is implemented by PLC and IOC. The controlling software accesses the operational command through the PLC. If the command is incorrect or the baking high voltage of another modes not turned off, the PLC would return an error code and not issue an execute command. If there is a PLC interlock interruption, the software interlock would protect the equipment. The two baking modes of the same device cannot be set. The flowchart of IP mechanism is shown in Fig. 4.

Fig. 4
figure 4

The flowchart of the interlock program

There are two baking modes for ion pumps, which are 4 kV and 6 kV. The two baking modes must operate independently. Therefore, the interlock protection function is triggered if any misoperation or any status of the ion pump controller is wrong. The interlock protection function of the baking mode also is added to the IOC layer. The setting of the baking voltage is designed with a password protection function and warning information.

Design of MySQL-based database

The archive system based on java is built to be used for the EPICS data archiver. MySQL is used as the data storage and inquire mechanism for recording historic data. Historical data could provide a basis for improving equipment performance and a data model for advanced research of the machine protection system in the future.

Historical data of current and voltage values of the ion pump power could be retrieved through the CSS plugin. The relational database collects current or voltage data through an archiving engine and stores it. The stored information includes PV value, time stamp, sampling mode and so on. In addition, the database also includes log information such as status abnormalities, current alarms and chain protection.

Historical current or voltage data and curves could be retrieved and monitored conveniently in CSS using Data Browser widget, which was developed based on JAVA and Eclipse plugin technology, could be run on Windows, Linux or Mac operating systems [9]. CSS provides a trending tool called Data Browser, which could real-time display PVs as well as historical data in a curvilinear chart type.

Results and conclusions

The ion pump control system has been designed and deployed on-site. The system has been developed based on EPICS architecture under the CentOS operating system, which reduces the code maintenance, simplifies the software structure and improves the reliability of the system operation. PLC controller, which could realize double interlocking in the case of equipment failure or abnormal parameters. The software interlock protection time is 100 ms, and the PLC interlock protection time is 40 ms. Figure 5 shows the historical curve of the current data of the TR5 and TR6 ion pumps. The archive cycle is set to 5 min for archiving one data and 288 points of data are archived in 24 h to the database. The result of the system is shown in Table 2. It can be seen from Fig. 5 that the stability of the system could reach 5% and the interlock protection time is less than 40 ms.

Fig. 5
figure 5

The chart of historical data for output current

Table 2 Test result of the ion pump control system

The control system has been running reliably and steadily for a long period. In practice, the developed system enables remote control and monitor of all ion pumps and interlock protection operation. Test results show that the system offers efficiency and stability of the control precision.

Firstly, the response time of the system could reach 100 ms and the frequency of data acquisition reaches to 10 time/s. At the same time, PLC returns the corresponding error code. Finally, a network re-connection function is integrated into the remote control software, which can eliminate various kinds of interwork interference. So far, the control system has been running successfully for more than a year. The control system meets the nearly all of control requirements so that the experiment operations become more and more visual and convenience. The control system should become one part of the accelerator machine protection system in the near future. The baking voltage of the ion pump could be automatically set according to the change of the vacuum degree. Therefore, the beam quality of the accelerator not only be improved, the stability and control accuracy of the system but also could be enhanced.