An automated HAXPES measurement system with user-friendly GUI for R4000-10 keV at BL46XU in SPring-8

We have developed a noble HAXPES measurement system, where the controls for sample manipulation and VG Scienta R4000 work together. The main part of the system is developed by spec. R4000 is controlled by sending commands from spec to the TCP server programed by LabVIEW with SESWrapper library. The command line interface of spec is wrapped by a graphical user interface (GUI) which can be easily operated by users. The sample can be aligned in the intuitive way by clicking the position to be measured on the sample image. Fine alignment can be done by scanning the sample position to maximize the count rate of photoelectrons. After setting measurement positions and conditions on the GUI, the automatic measurements through the multiple measurement positions can be performed in this system.


Introduction
In the Engineering Science Research III beamline, BL46XU, of SPring-8, a hard X-ray photoemission spectroscopy (HAXPES) system equipped with VG-Scienta R4000-10 keV analyzer has been opened to users since 2008. Utilizing a large escape depth of photoelectrons excited by hard X-ray, the R4000 system has been served as a powerful tool for elucidating the electronic states deep inside the material, such as electrode/dielectric interfaces buried in gate stack structures and the electrodes in Li-ion batteries covered by solid electrolyte interfaces (SEI) layers with considerable thickness (several tens of nm). Nowadays, an increasing number of users are applying HAXPES analysis to solve their problems. Thus the improvement in the efficiency and the usability of the HAXPES system is highly needed.
The efficiency and the usability will be improved if the analyzer control and sample manipulation work together, since it makes the automatic measurements through different measurement positions possible. In the SpecsLab2 software for the SPECS Phoibos analyzer [1], the ObjectServer integrates the various controls including the sample manipulation through CORBA (Common Object Request Broker Architecture) interfaces. The ProCSA software for FOCUS HV-CSA analyzer [2] works as the TCP server to be controlled by other systems externally. Although the genuine program for R4000, SES, itself does not have such functions, the so-called SESWrapper library for LabVIEW of National Instruments distributed by VG Scienta [3] can be used to build the external control system for R4000.
In the conventional HAXPES system of BL46XU, R4000 was controlled by SES, and spec of Certified Scientific Software was employed for the sample position control. Since they were not linked together, the automatic measurements through multiple measurement positions and the scanning of a sample position with monitoring the count rate of the photoemission were impossible. To realize these, we have developed a novel HAXPES measurement system, in which the control for R4000 analyzer and that for sample manipulation are integrated. The main part of the system was coded by spec. An external control system for R4000 which can be controlled by spec via TCP/IP protocol was developed by using LabVIEW and the SESWrapper library. For improve the usability, the command line interface of spec is wrapped by the graphical user interface (GUI). Figure 1 shows the comparison between the conventional and the new HAXPES measurement systems. In the conventional system (Figure 1(a)), users manipulate samples by executing commands at a terminal emulator (TeraTerm) on Windows PC connected to spec running on Linux PC. On the other hand, the setting of the kinetic energy, the monitoring of the count rate of photoemission, and the measurement of the spectra are done by SES. For the measurements, users have to do the following procedures for each measurement position. Firstly, they align the sample by spec monitoring the sample image from the CCD cameras mounted on the measurement chamber. Secondly, they adjust finely the sample position on spec so that the count-rate of photoemission from the sample monitored by SES maximizes. Finally, they set the measurement conditions and run the measurements on SES. Since spec and SES are independent of each other, the automatic measurement through multiple positions is impossible in the conventional system.

Details of new HAXPES measurement system
In order to integrate the control of R4000 and that of sample manipulation, we constructed new measurement system depicted in Figure 1(b). The main part of the system was coded by spec, which controls both sample position and R4000. In order to control R4000 from spec, a TCP server has been developed by using LabVIEW 8.6. We adopted this design because of the following reasons. (i) Development of the system by spec is simple and fast. In addition, most of the basic commands of spec to manipulate the sample in the conventional system can be also used in the new system as they are. (ii) The part for controlling R4000 is readily constructed by LabVIEW, for which the library to  The TCP server receives the commands to control R4000 from spec and returns values to it, if any, via TCP/IP. Thus the external control of R4000 by spec has become possible. The TCP server program also acts as the real time monitors for the detector image and the count rate, and the spectrum of an ongoing measurement (Figures 2(a) and (b), respectively). On the other hand, a number of spec commands necessary for the automatic measurements have been newly produced, i.e., the commands for setting voltages of the electrodes, getting photoemission count, setting the measurement conditions, starting a measurement, saving the data, storing a sample position to be measured, etc. With the system described up to here, the automatic measurements are basically possible by making a macro file with properly arranged commands and loading it to spec.
For easier use of the system, we developed a GUI by Visual Basic 2010 of Microsoft. It throws spec commands to the terminal emulator according to the actions (events) made on it using the SendMessage function of Visual Basic. As shown in Figure 3, there are the sample alignment mode (a) and the measurement condition setting mode (b) in the GUI, which are switchable by the tabs in the upper part of the GUI.
In the sample alignment mode (Figure 3(a)), the real-time image of the sample from one of the CCD cameras (Cam-1 and Cam-2 in the Figure 3) is displayed at the center of the GUI. The images of the CCD cameras are captured into PC by the frame grabber board, DFG/MC4/PCIe, of The Imaging Source. Cam-1 is mounted 45° above the X-ray beam indicated by the yellow line in the image, and Cam-2 is on the lens axis of the analyzer indicated by the gray crosshairs in the image. Thus the images of Cam-1 and Cam-2 are used for the sample alignment with respect to the X-ray beam and analyzer lens axis, respectively.
The sample alignment is usually performed as follows. (i) The number of the face (1 -6, since the sample holder has six faces for sample mounting) and a take-off angle are set to align the samples mounted on the designated face roughly to the measurement position. (ii) Then the sample is aligned on the sample image shown in the middle part of the GUI. By clicking a certain point on the image, the sample manipulator moves so that the clicked position on the sample aligns on the X-ray axis (the yellow line) when Cam-1 is selected, or on the axis of analyzer lens (the gray crosshairs) when Cam-2 is selected. (iii) Fine alignment is done by scanning the sample position with respect to the photoemission counts detected by R4000. (iv) After the alignment is finished, the position (x, y, z, θ coordinates of the manipulator) is stored with an arbitrary position name. By repeating the procedures (i) -(iv), users can store multiple measurement positions in the system.
After setting all the sample positions to be measured, users proceed to the measurement condition setting mode (Figure 3(b)). A measurement region with the information of the energy range, energy step, and dwell time can be created with an arbitrary region name by opening the dialog box for editing the regions. The conditions for a measurement, i.e., a sample position, a measurement region, and a number of sweeps is specified in a row of the table in the window. Sample positions and regions can be selected easily from the position and region names in the dropdown list which emerges by clicking a cell. The rows to be measured are checked at the second column of the table. When all the procedures described above are finished, an automatic measurement can be started by pressing the start button.

Characteristics of the new system
The new measurement system has been opened to users since Oct. 2012 and has been widely used by them. The system has several advantageous characteristics as described below.
First of all, automatic measurements through a lot of measurement positions are available. This feature is quite advantageous when users want to execute the measurements of many samples and/or at many take-off angles in a routine way. In some cases, the automatic measurements for several hours or even longer are possible. This feature is guaranteed by the beam stability of BL46XU. However there is a concern about the beam abort of the storage ring. We cope with it by checking the ring current during the measurement. If the ring current falls below the critical value, the system stops a measurement and sends the voice mail alerting the failure to the PHSs for users. Secondly, the system is easy to operate. The design of GUI is simple and easy to use even for unaccustomed users. Especially the sample alignment system using the frame grabber board made us possible to align samples intuitively. Note that the concept of the sample alignment with framegrabber board may be applicable to other experiment systems. Thirdly, the system is flexible and easy to customize. In some customized experiments, the automatic measurement using the GUI will not be possible. It will take long time to develop sophisticated GUIs for customized experiments. However, the base system developed by spec is easy to customize. For example, we utilized this property to the bias applied HAXPES measurements. Firstly, we made the spec macro to change the voltage of the DC power source (ADC 6240A) via GPIB. This is easy, since spec has GPIB interface and command-sets to control GPIB instruments. Then we created a macro file where the commands to change the sample position, to measure spectrum, and to change of bias voltage are simply arranged. Finally the file was loaded to spec, and the automatic measurements defined in the file was executed. Thus the new system is advantageous not only for routine experiments but also for customized ones.