The Development of Data Acquisition and Remote Real-Time Display System for EAST NBI

The data acquisition and remote real-time display system for the neutral beam injectors (NBI) on experimental advanced superconducting tokamak (EAST) are described in this paper. Distributed computer systems including local data acquisition (DAQ) facility, remote data server (DS), real-time display terminal are adopted with Linux and Windows operating system. Experimental signals are gathered by DAQ device at local working ﬁeld. On the one hand, these gathered data will be sent to DS which runs on remote server main control layer on EAST NBI control network for saving and processing; on the other hand, these data will be sent to real-time display terminal which runs on remote monitoring layer on EAST NBI for displaying and monitoring experimental signals real-timely. Another point needs to be mentioned is that the real-time display software can call back historical data from DS for querying. The software of data acquisition and DS are programmed by C language while the real-time display software is programmed by Labview ﬂow chart. The hardware mainly includes DAQ cards, server, indus-trial personal computer and others auxiliary hardware. Now the system proved to be performed well through experi-ments on NBI testing bed.


Introduction
Two neutral beam injectors of 2-4 MW H 0 power, 50-80 keV beam energy and 10-100 s beam pulse width are presently undergoing at the Institute of Plasma Physics, Chinese Academy of Science (ASIPP) as the mainly auxiliary heating systems for experimental advanced superconducting tokamak (EAST) [1,2]. The installation and commissioning of the injectors and peripherals including high power supply system, water cooling system, vacuum system, data acquisition and control diagnostic system proceeds at a good pace. The heating target for EAST will be realized within two stages [3]: for the first stage, the plasma ion temperature of EAST will be improved from 3 to 5 keV and it will be improved from 5 to 8 keV at the next stage. The neutral beams injected into the plasma of EAST are being scheduled for this year.
The choice of developing data acquisition and remote real-time display system is considerably necessary and important. To a certain extent, real-time display system will offer security both to experimenters and devices in neutral beam injectors (NBI) system. Once it detects an over-current or an over-voltage signal, an alarm signal will be sent out and thus cause the attentions of experimenters. At the same time, an emergency stop signal will be transmitted to NBI control system to terminate the current operation. So there is highly necessary to develop a data acquisition and real-time display system for EAST NBI.
In this work, the design and implementation of data acquisition and real-time display system for EAST NBI will be introduced.

Requirements Description
The data acquisition (DAQ) and remote real-time display system is one of the most significant sub-systems of EAST NBI control system. The standard of the data acquisition and real-time display system for EAST neutral beam injectors must correspond to the need of a high level of integration with NBI control system. The conceptions underlying the design of this system can be summarized by the following ideas: a. The system should be operated independently both in local mode and remote control mode with the maximum flexibility [4]. A high level of integration with the EAST NBI control system is demanded. b. The key devices such as DAQ facility, data server (DS) should be commanded by the control server of NBI control system, where they will receive experimental configuration and synchronous trigger signal. c. The user interface should be offered to terminals for displaying the data generated by the current shot operation real-timely and calling back historical shot data from data base through DS. d. An alarm signal and an emergency stop signal should be send out once the experiment is in abnormal situations. e. Reasonable network protocols and data transfer structure must be unified between the communications of different devices in the NBI in-house network.
To sum up the outlines of the system can be described as: one DAQ computer next to the neutral beam injector works on local work field performing to get experimental configuration and external trigger signal from NBI control server for collecting data and saving processed data both on local disk and remote DS, as well as transporting experimental data to real-time display terminal during the injector shot. One DS device works at remote NBI control room performing to update all data into data base and offer interface for calling back historical data. One real-time display terminal performs to display and monitor experimental signals real-timely.

Hardware Architecture
The overall structure of the data acquisition and remote real-time display system is schematically shown in Fig. 1.
Considering that the disparity of the devices on geographical position, distributed computer structure is adopted in EAST NBI control system [5]. The system has a DS running Linux Ret Hat operating system, which works at the remote NBI control room for receiving and saving data from DAQ device, as well as offering user interface for data call back.
There is also a DAQ computer placed in local EAST NBI experimental hall for data acquisition. For DAQ, because of the operability and economical efficiency and the most important point is the sample rate which is not too high or not too low, is appropriate to do real-time display, so PCI-9112 DAQ cards are adopted for performing analog signal acquisition, signal analog/digital conversation, internal clock source generation and counting, analog voltage signal outputs and so on. PCI-9112 has two working mode: Single buffered data output mode and double buffered data output mode [6]. In a single buffered mode, according to the this output mode, the data collection acquisition sampling points at the specified sampling frequency will be set in advance, and then the collected data will be transferred to a user data buffer. In the doublebuffered data output mode, it can achieve a continuous and stable data acquisition and use the two data buffer alternately, so that the system performance can be improved greatly. So in this paper, double-buffered data output mode for PCI-9112 is adopted. Field original signals be generated will be sent to DAQ upper control computer trough signal extendible chassis and will be transferred to PCI-9112 DAQ card through ACLD-9118 connector line.
In order to achieve the segregation of the data stream and control stream, NBI Ethernet is divided into data subnetwork and control sub-network for communicating data and control commands separately. In NBI control room, a terminal that connects to NBI data sub-network can run data real-time display application software for displaying and monitoring the current shot data and querying historical shot operation data.
The EAST NBI control server works on control system provides the external trigger signal and experimental configurations by means of optic fibers.
All devices in NBI in-house network use Ethernet connections through switcher and optic fibers to ensure communication.

Software Implementation
The glancing software flow diagram of DAQ and real-time display system is presented in Fig. 2.
As a server for data storage and processing we use a DELL frame type server with Linux operating system. The DS acts as a firewall for forbidding illegal terminal access. Unless a legal user that registers to DS can get needed services from it. Data reception, storage and query software programmed by C programming language runs on this machine. When it starts, independent threads will be cre- Fig. 1 The hardware architecture of DAQ and remote real-time display system Fig. 2 The control software flow diagram ated for listening DAQ data from local DAQ facility and for querying historical data under given shot from real-time display terminal. A detailed description of DS for the injectors has been presented in the International Conference CDMMS [7].
The real-time display software is programmed by Labview flow chart with Windows OS. DAQ software is programmed by C language and designed to be worked at different experiment mode such as local mode and remote mode. The obvious differences about these two modes are the sources of trigger and DAQ configuration.
We take remote mode for example. When there is DAQ configuration information and synchronous trigger signal comes from EAST NBI control server, the corresponding functions will update DAQ cards configuration and start DAQ immediately. During the injector shot, real-time display application software works on remote NBI control room will listen to data from local DAQ machine and display these data real-timely. Another point is that this software can get experimental setting configurations from NBI control server, according the configurations, once there is an unmoral signal is detected, an alarm signal will be sent out and an emergency stop signal will be transmitted to NBI control system to terminate the current operations.
When one shot DAQ is over, after being dealt with, the analog voltage signals will be output. In order to save data into data base with few space and relieving the network load when transfers data, there need to compress these analog data with Lempel-Ziv-Oberhumer (LZO) lossless compression algorithm at DAQ machine before transporting them to DS. When DS listens there are data coming, it will update data into data base. And at then, the real-time display terminal also can call back historical injector shot data for querying.
The communication between devices in NBI system is based on standard TCP protocol with C/S program mode and multi-thread technology.

Conclusion
The hardware and software implementation of EAST NBI data acquisition and remote real-time display system have been described in this paper. Experimental testing results on EAST NBI testing bed show that it can work well. The data acquisition and display terminal offer a platform for collecting, displaying, monitoring and querying experimental physical signals which are considerably significant for experimenters analyzing results and diagnosing the control signals for EAST NBI control system. The system will be put into use in this year when NBI are installed on EAST.