logo

The control system for water-cooled DCMS in SSRF

SYNCHROTRON RADIATION TECHNOLOGY AND APPLICATIONS

The control system for water-cooled DCMS in SSRF

JIA Wen-Hong
MA Shi-Wei
ZHENG Li-Fang
Nuclear Science and TechniquesVol.26, No.2Article number 020103Published in print 20 Apr 2015Available online 20 Apr 2015
63501

A monochromator is important to a beamline for desired monochromatic light. There are three water-cooled double crystal monochromators (DCMs) commissioned in the phase-I beamlines of Shanghai Synchrotron Radiation Facility (SSRF). In this paper, the mechanical principle of the DCMs is introduced. A control system for the monochromator based on the standard architecture for SSRF beamlines is described. To achieve the control requirement precisely, the hardware includes VME (Versa Module Eurocard)-based controller for stepper motors, RS-232-based controllers for micropositioning and piezoelectric actuators. The software is developed with EPICS (Experimental Physics and Industrial Control System) package. Test results have revealed the stability and reliability of the system.

EPICSWater-cooled DCMMotion ControlSSRF

I. INTRODUCTION

There are three water-cooled double crystal monochromators (DCMs) on XRD (X-ray Diffraction), SAXS (Small Angle X-ray Scattering), and HF (high flux) beamlines in Shanghai Synchrotron Radiation Facility (SSRF) [1]. The control systems for the two DCMs built in 2008 were developed with LabView by the manufacturer. This brings much trouble in the operation and maintenance because the hardware and software are quite different from the standard architecture of the whole beamline control system. For the new-built HF beamline, the DCM control system is developed using the standard EPICS (Experimental Physics and Industrial Control System) platform [2] and has been operating properly since June 2013. The control system for SAXS beamline was updated to EPICS, too, in 2013.

The working principle of the DCMs is similar. It adopts a pair of crystals in dispersion-free arrangement. The 1 crystal diffracts the incident white synchrotron beam, while the 2 crystal adjusts in multi dimensions to keep the exit beam fixed and parallel with the incident beam. According to the Bragg equation, the desired energy is decided by the Bragg angle. Thereby, different photon energies can be reached by controlling the Bragg angle θB.

2dsinθB=nλ, (1)

where d is lattice diffraction constant of the crystal, and n is the diffraction series (normally n =1).

The Bragg rotation axis is designed to pass through the reflecting surface centre of the first crystal. Fig. 1 shows axis definition of the DCM [3]. While rotating the Bragg axis, it is necessary to adjust the angles and displacements of the two crystals, so as to fix the exit beam height and direction.

Fig. 1.
(Color online) Axes definition of the DCMs.
pic

While some motion mechanisms of the DCMs are similar, they have their individual mechanical parts. The 2 crystal of XRD is designed for bender adjustment to focus the X-ray beam, but the 2 crystal of HF is added with a piezoelectric actuator for high resolution. The physical variables and components of three DCMs at SSRF are listed in Table 1.

TABLE 1.
Physical variables and the components
Phys. variables XRD SAXS HF
Y2 PK569-B PK569-B
Roll1 PK566-B PK566-B M235
Roll2 M235
Yaw2 PK566-B PK566-B
Pitch2 M230 M230 M235
Pitch2-Piezo P843.6
Bender M230
DVRT HSG-DVRT-6
Show more
* They use the same components as follows: θB, VRDM 397/50; Z2, PK566-B; Temperature monitor, Pt100.

II. HARDWARE

There are five control models for the DCMs. Stepper motors and precision actuators are used to control the Bragg angle, T2, Z2, Roll1, Roll2 and Yaw2. The DVRTs (Differential Variable Reluctance Transducer), linear displacement sensors are installed to monitor the position of micropositioning actuators. One piezoelectric actuator is employed to fine tune the pitch of the 2 crystal. The temperature inside the DCM chamber and the cooling water cycle unit need monitoring.

According to the distributed feature of EPICS, the hardware includes three layers: an operator interface (OPI), an input/output controller (IOC) and motor drivers or position monitor. Fig. 2 shows the SAXA DCM hardware architecture. It is similar with the HF DCM’s to a great extent, whereas for the HF DCM, DVRTs, the world’s smallest linear displacement sensor, are used to get the angle displacement.

Fig. 2.
(Color online) SAXS DCM hardware architecture.
pic

The OPI is a HP-PC running the operator interfaces with Linux operating system and EPICS up-level tools.

There are two IOCs: a VME (Versa Module Eurocard) system and an HP-PC. The VME system includes a MVME5500 processor and a MAXv-8000 motion controller. The MVME5500 is a Powerpc604 CPU running VxWorks5.5 real time operating system. The MAXv-8000 is a VMEbus-based motion controller, which can manage up to 8 axes of open-loop stepper, closed-loop stepper or servo systems. It is connected to 5-phase stepper motor drivers to control the stepper motors. The OPI communicates with the IOCs through Ethernet [4]. The soft IOC is running on the HP-PC which manages the devices based on serial communication. The micropositioning actuators M230 and piezoelectric actuator P843.6 are controlled by three C-863 and one E621 separately. All of them work in the serial mode. A serial server is applied to communicate between the PC/IOC and serial port equipments. An ADAM4015 is employed to monitor the temperature.

III. SOFTWARE

A. Software Structure

EPICS is a set of software tools and applications which provide a software infrastructure in building distributed control systems to operate devices. The latest version of EPICS on Linux is used for the control system. Four EPICS support modules, i.e. asyn, motor [5], calc [6] and StreamDevice [7], are employed to implement the control functionality. These four modules can be found in the APS (Advanced Photon Source) synApps package [8].

There are several methods to develop a control application with EPICS, building applicable run-time databases, programming right function codes with SNL (State Notation Language) or writing appropriate application programs with Python. A run-time database or a SNL program runs in an IOC while a Python program runs in the OPI level.

Editing a run-time database by using and combining some records is effective and easy to use for an application. After being edited with a simple text editor, the database should be specified in a startup script file and loaded into the IOC automatically with other libraries and configure files when an IOC starts.

The fields of a record can be accessed by the clients on an OPI through Channel Access (CA). Based on the sockets of the network protocol, CA provides not only simple functions for developing clients, but also specially designs to reach high bandwidth due to its client-server mode and the callback mechanism.

B. Motion of single stepper motor

The motor record is a basic application to the beamline motion control system. It has over 100 fields corresponding to parameters of the stepper motor, such as resolution, run direction, velocity, etc. The essential function of a motor control consists of moving the motor to the set position at the pre-established speed and commanding the motor to stop when a limit is active. Each field in the motor record should be configured correctly.

C. Energy regulation and realization of linkage control

During a beamline operation, the beam energy and position are more concerned than the Bragg angle and other single motor value. So the control software should provide the physical variables. These functions can be realized by combining with the motor records, the soft motor records, transform records, and so on.

In the runtime database, the real stepper motors are represented by motor records, while the physical variables can be represented by soft motor records. Transform records are not only used to calculate the value between the physical variables and parameters of the real motor, but also used to coordinate operation between the motors.

EPICS records have two fields of INP/OUT for getting/putting value from/to other records. They are linked together. Between the linked records, there are three main linking modes [9], PP (process passive), NPP (not process passive) and CP (channel access and process). By using these linking modes, the program can form loops to realize the algorithms among motors. There are two loops in the DCM control database. One loop employs two transform records to execute the conversation between Bragg angle and Energy. Another loop, shown in Fig. 3, is designed to actualize coordination motion between Bragg and Z2. When the Bragg angle is moving, Z2 must move in accordance with the Eq. (2) to ensure the exit beam position fixed.

Fig. 3.
Loop of Coordination motion.
pic
nZ=H/[2(1/cosθ1/cosθ0)]. (2)

In this loop, a transform record is used to calculate the Z2 displacement relative to Bragg angle.

In order to meet different requirements during beamline commissioning, operation or maintaining, two working patterns are set up: the coordinate motion and the independent motion. In the GUI (Graphical User Interface), as shown in Fig. 5, when the YES button is pressed, Z2 always coordinates with the Bragg angle. If the NO button is pressed, two motors of Bragg angle and Z2 are moved independently. At this pattern, the Z2 offset can be still compensated by activating the Compensate button. The program workflow is shown in Fig. 4.

Fig. 5.
(Color online) CSS-based control interface.
pic
Fig. 4.
Coordinate flow diagram.
pic
D. Control for serial devices

The StreamDevice module is used for ADAM4015 and the multichannel signal conditioner [10] which acquires the DVRTs signals. It is a generic device support for devices with a "byte stream" based message communication interface. For receiving/sending messages, it uses ai/ao record whose INP/OUT field is specified with a protocol file followed by a special function. The record and the protocol of ADAM4015 are listed below:

record(ai, "RollTemp")

field(DESC, "4015 X16B1:T0")

field(PREC, "2")

field(DTYP, "stream")

field(INP, "@temp.proto gettemp(YawTemp, YTemp, ZTemp, PT1, PT2) NP5610-temp")

field(EGU, "A")

field(SCAN, "2 second")

record(ai, "YawTemp")

field(DESC, "4015 X16B1:T1")

field(PREC, "2")

……

Filename: temp.proto

OutTerminator = CR;

InTerminator = CR;

f = 0x21;

gettemp

out "#3031"; in ">%f%($1.VAL)f% ($2.VAL)f% ($3.VAL)f%($4.VAL)f%($5.VAL)f";

"temp.proto" is the ADAM4015 protocol file which should be defined in the startup script file. The RollTemp record is a StreamDevice record. Its INP field is linked to the 'gettemp’ function in the file 'temp.proto’. The function assigns a series of value from ADAM4015 to the soft ai records of YawTemp, Ytemp, Ztemp, PT1 and PT2. Ytemp, Ztemp, PT1 and PT2 are defined like YawTemp in the db file.

E. Save and restore parameters

Usually the beamline scientists make great effort to adjust every motor to achieve optimal state of the beamline. By default, when the system is powered off, the motor position and other messages will disappear completely. They have to start from zero to commission the beamline step by step when the power is on. So it is important to save key parameters automatically in beamline operation. The "autosave" module can save the field values of EPICS records periodically and restore each value when an IOC restarts. To use this function, two text files named "positions.req" and "settings.req" [11] are needed. The value fields are specified in "positions.req" file and other parameter fields are listed in "settings.req" file. According to the two files, the EPICS IOC will update the field values to the files of "positions.sav" and "settings.sav" separately. When the IOC restarts, the values saved in "positions.sav" and "settings.sav" will be restored automatically to recover the original state of the beamline.

F. Save and restore parameters

The OPI interface of DCM control is built with CSS (Control System Studio) [12]. As an Eclipse-based collection of tools, it integrates the powerful functions of alarm handler, archive engine, operator interface and diagnostic tools. In our application, we use CSS-BOY, which is the most interesting component of CSS, to replace EDM (Extensible Display Manager) to build the interface with drag & drop, and to connect to the data instantly. This makes it very convenient to create the GUI. Fig. 4 is a screenshot of the control interface.

All those data can be easily archived by the RDB channel archiver and accessed fast and straightforwardly by authorized user via web brower from any networked computer [13].

IV. TESTS AND RESULTS

The Bragg angle at BL17B1 covers an range of 5.67–23.29, which corresponds to the energy range of 5–20 keV with the Si(111) reflection. While scanning the energy, it is important to keep the two crystals parallel for a stable beam intensity, which has decisive influence on the users’ experiments. So DCM’s performance can be evaluated by parallelism of the two crystals. This was tested at the manufactory. Fig. 6 shows the test result, and the insert shows the test platform. The parallelism of two crystals is within 2 arcsec, meeting the expected requirement.

Fig. 6.
(Color online) Result of the parallelism test.
pic

After integrating the DCM control system into the HF beamline, tests were done to check the energy resolution. An ionization chamber was used in downstream of the monochromator to provide the information of the photon flux. The rocking curve of the DCM is shown in Fig. 7. The FWHM of the rocking curve is 0.00215. The energy resolution is better than the design specification of 3×10-4.

Fig. 7.
(Color online) The Rocking curve at 12 keV in HF beamline.
pic

V. CONCLUSION

The control system based on the standard hardware and software structure not only helps us adopt successful experience from other similar devices, but also brings great benefit for operation and maintenance. The control system of DCM has been working stably and reliably since September 2013. It will be applied to the new beamlines in the future.

References
[1]

SSRF home page

. http://ssrf.sinap.ac.cn/index.htm.
Baidu ScholarGoogle Scholar
[2]

EPICS home page

. http://www.aps.anl.gov/epics/about.php.
Baidu ScholarGoogle Scholar
[3] Y N Zhou, Z H Zhang, Z Jiang, et al.

Motion control in SSRF liquid nitrogen cooled DCM using EPICS

. Computer Engineering and Applications, 2012, 48: 236-238. (in Chinese) DOI: 10.3778/j.issn.1002-8331.2012.08.067
Baidu ScholarGoogle Scholar
[4] Y Hu, L F Zheng, J L Li, et al.

Research of EtherNet/IP under EPICS environment

. Nucl Tech, 2006, 29: 805-808. (in Chinese) DOI: 10.3321/j.issn:0253-3219.2006.11.002
Baidu ScholarGoogle Scholar
[5] M Tim, S Joe and S Ron.

Motor record and related software

. http://www.aps.anl.gov/bcda/synApps/motor/R6-7/motorRecord.html.
Baidu ScholarGoogle Scholar
[6] M Tim.

Calc module Documentation

. http://www.aps.anl.gov/bcda/synApps/calc/R2-8/calcDocs.html.
Baidu ScholarGoogle Scholar
[7] Z Dirk.

StreamDevice manual

. http://epics.web.psi.ch/software/streamdevice/.
Baidu ScholarGoogle Scholar
[8]

SynApps home page

. http://www.aps.anl.gov/bcda/synApps/.
Baidu ScholarGoogle Scholar
[9] M R Kraimer, J Anderson, A Johnson, et al. EPICS input/output controller application developer’s guide, ANL, Argonne, IL 60439, USA, 2004.
[10]

MicroStrain motherboards mannual

. http://www.microstrain.com/displacement/motherboards.
Baidu ScholarGoogle Scholar
[11] M Tim.

Autosave documentation

. http://www.aps.anl.gov/bcda/synApps/autosave/autoSave.
Baidu ScholarGoogle Scholar
[12]

Control system studio homepage

. http://sourceforge.net/apps/trac/cs-studio/wiki/BOY.
Baidu ScholarGoogle Scholar
[13] Z Hu, Q R Mi, L F Zheng, et al.

EPICS data archiver at SSRF beamlines

. Nucl Sci Tech, 2014, 25: 020103. DOI: 10.13538/j.1001-8042/nst.25.020103
Baidu ScholarGoogle Scholar