Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Fusion Engineering and Design 81 (2006) 1795–1798

Experience with RFX-mod data acquisition system


M. Cavinato, A. Luchetta, G. Manduchi, C. Taliercio ∗ , F. Baldo, M. Breda,
R. Capobianco, M. Moressa, P. Simionato, E. Zampiva
Consorzio RFX, Euratom-ENEA Association, Corso Stati Uniti 4, 35127 Padova, Italy

Available online 11 May 2006

Abstract

Operation of the new RFX machine has started in fall 2004, using a completely renewed version of its MDSplus data
acquisition system. The new system runs under Linux and is highly distributed, employing approximately 20 machines which
perform local data acquisition and communicate with a central server. The overall experience after several months of operation
has been quite successful. In particular, the following aspects represent the major changes, besides the migration from VMS to
Linux:
- exclusive usage of the MDSplus scripting language TDI to write the device-specific application code;
- exclusive usage of Java, and in particular of jScope, for data display in the control room and in the offices;
- exclusive usage of Java for the coordination tools.
© 2006 Elsevier B.V. All rights reserved.

Keywords: Data acquisition; Distributed systems; Java interface

1. Introduction package. Still retaining the original architecture, the


new package has been completely re-written, and cur-
RFX-mod has begun operation in December 2004, rently represents the de facto standard for data access
after a 5-year shutdown during which several major in the fusion community. MDSplus can be used in a
improvements have been performed. During the shut- variety of different configurations because of its native
down, the data acquisition system has been completely support for remote access via mdsip, a communica-
renewed by migrating from VMS to a distributed Linux tion protocol based on TCP/IP [1]. The configuration
architecture. Both the old and the new data acquisition adopted at RFX-mod is described in [2], and in this
systems are based on the MDSplus data acquisition paper, we report our experience after more than 1
year of operation (including commissioning), which
has confirmed the validity of the initial choices. We
∗ Corresponding author. Tel.: +39 049 8295039; report also the experience gained in the extensive usage
fax: +39 049 8700718. of the Java framework for data visualization and task
E-mail address: cesare.taliercio@igi.cnr.it (C. Taliercio). coordination. RFX-mod, in fact, is the only experiment

0920-3796/$ – see front matter © 2006 Elsevier B.V. All rights reserved.
doi:10.1016/j.fusengdes.2006.04.037
1796 M. Cavinato et al. / Fusion Engineering and Design 81 (2006) 1795–1798

in which the Java components of MDSplus are used lowing configurations:


extensively.
(1) export the Server File System through NFS so that
every computer can access the pulse file as if it
were local;
2. Hardware architecture and data
(2) let the computers access pulse files via mdsip, the
organization
MDSplus protocol for exporting pulse file data. No
file system is exported in this case;
RFX-mod employs extensive CompactPCI (cPCI)
(3) let the corresponding pulse file, hosting crate-
data acquisition, based on 13 cPCI racks, each hosting
specific data be stored in the crate’s local disk. In
a Pentium III CPU board [3], a timing board [4] and up
this case the pulse file is handled by MDSplus as a
to 12 transient recorders [5]. The timing board provides
remote subtree.
eight channels capable to generate timing signals such
as multi-speed clock and triggers with 100 ns of time The first solution has been excluded because it did
resolution. The timing boards are connected via a fibre not provide good performance. To access pulse file
optic link so that a unique 1 MHz clock synchronizes all data using the second solution, it is only necessary to
the timing devices, including the older CAMAC timing change an environment variable used by MDSplus to
devices, still used for diagnostic data acquisition. The locate the directory containing the pulse files. If such
transient recorder boards provide 16 channels with 2 M a variable contains an IP address, the data access layer
samples of memory per channel and a sampling rate of of MDSplus handles transparently mdsip communica-
up to 200 kHz. tion, and no change is needed in the user code. The
The CPU boards run RedHat 8 Linux and MDSplus. third solution may look interesting because, in princi-
A central Linux server (using RedHat Enterprise ple, it reduces network traffic and performs faster data
Linux) hosts all the pulse files, except one, for a diag- storage. On the other side, handling tens of different
nostic, which produces a large amount (350 Mbytes) subtrees in different disks raises a serious management
of data and is supervised by a Windows server. Win- problem for backup and data integrity. For these rea-
dows PCs are used for some diagnostics, while most use sons, the second solution has been chosen, storing most
CAMAC data acquisition by means of two CAMAC pulse files in the central Linux server and using RAID
Serial Highway drivers connected via SCSI to the cen- 0 + 1 configuration to ensure data integrity. The mdsip
tral Linux server. servers are activated as xinet services and, despite the
The usage of Windows instead of Linux is not fact that 100 Mbytes of data are written into the pulse
encouraged, but there are situations in which this is file per shot, we never experienced a failure in data
unavoidable because of the exclusive availability of the access after more than 1 year of operation once the
required drivers for Windows, or the in-house avail- system has been properly configured.
ability of interface boards and drivers, such as GPIB
adapters. Not actively involved in data acquisition, 22
Linux workstations are located in central control room 3. TDI scripting language and Java device
for user interface. A workstation is used by the operator beans
to supervise setting of parameters and the operation of
the data acquisition tasks. The others are used to display The porting of the data acquisition system from
acquired waveforms via jScope and to run programs for VMS to Linux did not only require the adoption of
data analysis and visualization. the new multiplatform version of MDSplus. In order
Whereas CAMAC data acquisition is carried out by to perform data acquisition, in fact, MDSplus needs
processes running in the central Linux server, and there- to be integrated with device-specific components han-
fore read and write pulse file data locally, the rest of data dling the configuration set-up, data acquisition and user
acquisition is carried out by tasks running in the cPCI interface for the hardware devices defined in the exper-
computer boards, or on the diagnostics Windows PCs. iment. It has been therefore necessary to port this code
In the latter two cases, network data transfer is required to the new platform. Such a process can be eased by
to read and write the pulse files. We considered the fol- a code generation tool, which produces the MDSplus-
M. Cavinato et al. / Fusion Engineering and Design 81 (2006) 1795–1798 1797

specific code segments (i.e. the code interacting with using Java in this context has been so positive that we
the MDSplus framework) and allows the developer to decided to implement in Java also the action servers,
concentrate on the device-specific portion of code. This i.e. the tasks which receive the execution commands
approach has been followed, for example, at Alcator C- from jDispatcher and actually carry out data acquisition
MOD [6], when MDSplus was ported to Linux. tasks.
We preferred however to adopt an alternative way by The requirements for jDispatcher are well addressed
using the MDSplus scripting language, called TDI, to by a Java based solution: a heavily multithreaded envi-
develop all the device-specific code [7]. TDI is the lan- ronment and support for TCP/IP communication, but
guage for expressions, ubiquitous in MDSplus. Expres- neither memory demanding, nor computing intensive.
sions can be recursively formed by other expressions If we consider jScope, the Java-based visualization tool
to form TDI programs, whose syntax resembles that of of MDSplus, memory consumption may represent a
scripting languages such as IDL and Matlab. Since TDI problem, and in fact, to our experience, this sometimes
natively handles all the MDSplus data types, the result- represented a limitation in its usage. On the other side,
ing TDI code is very compact and usually no more than users were satisfied with the possibility of displaying
few tens of TDI statements are required to implement multiple waves and using colors, features extensively
a device support routine. used in almost all of the jScope applications running in
Even more dramatic is the reduction in the devel- the control room.
opment time for the device-specific set-up forms, to be A careful tuning of the tool has been therefore
integrated in jTraverser, the Java graphical user inter- required when jScope started to be extensively used,
face of the experiment model. The Java Device Beans in order to remove memory leaks and to reduce the
[8], developed to carry out the interface between visual allocation and deallocation of large objects. There is,
components and MDSplus, allow the construction of a however, a lower bound of 512 Mbytes in memory
new interface in a couple of hours, or even less. requirement in order to use jScope in real-world appli-
cations. Such amount of memory is now available in all
Linux workstations running in the control room, and
4. Java tools typically several tens of signals (sometimes hundreds)
are displayed on every workstation. There are however
In RFX-mod, the jDispatcher [9] tool is used for some diagnostics which produce very large signals:
the coordination of the data acquisition tasks during in this case jScope may still run out of memory, and
the pulse sequence. While in the old system most data waveform update may become slow. For this reason,
acquisition tasks were running in the same servers host- a new feature has been added to jScope, which allows
ing the pulse files, the duty of the dispatcher tool was data resampling at the data server site when data are
mainly the coordination of tasks within the same VMS accessed via mdsip. In this case the mdsip server (not
cluster, and therefore OS-specific communication was written in Java) performs data resampling on the fly, so
used. The current situation is much different, since 12 that only few Kbytes are exchanged in the network and
cPCI CPUs and 3 Windows PCs are involved during the memory consumption is reduced as jScope needs to
the sequence. A coordination tool will therefore need handle smaller arrays. On the fly resampling works well
to handle concurrent threads making network commu- when the whole waveform is displayed, as more points
nication, and such implementation requires much care would not add information because of the screen reso-
because of the possibility of race conditions and dead- lution, but the interface would be of poor quality when
locks. For this reason, we decided to develop a Java the user zooms portions of waveforms. For this reason,
tool, even though a similar tool was already avail- at every zoom operation, jScope requests the (resam-
able in the MDSplus package. The experience con- pled) points for the enlarged portion in order to increase
firmed our impression: thanks to the clean definition of resolution. The user experiences an increase in the res-
threads and network communication in the Java frame- olution of the zoomed portion a fraction of second after
work, the jDispatcher tool has been developed in less zooming, which proved well acceptable. JScope is also
than 2 months, and since its initial delivery, no bugs extensively used in the Windows PC located in the
related to race conditions appeared. The experience in offices. Users are encouraged to use jScope on the PC
1798 M. Cavinato et al. / Fusion Engineering and Design 81 (2006) 1795–1798

instead of opening an X session to some Linux work- ical components and require careful programming in
station in the control room, in order to better balance native code, but the usage of C and C++ in many other
resource consumption. components for data visualization, system supervision
As a matter of policy, the MDSplus package is not and coordination would imply longer development and
installed in the office PCs, unless there is a compelling especially debugging times. Even for those compo-
reason, such as the usage of Matlab, which requires nents for which memory resources proved more criti-
MDSplus running locally to access experiment data. cal, such as data visualization, our experience showed
JScope represents therefore the only MDSplus tool that investing some resources for a 512 Mbytes mem-
installed in every office PC. In order to reduce the ory expansion is well worth if we consider how much
maintenance time, and to keep the tool up-to-date in development and debugging time is saved.
every installation, Java Web Start is used to distribute
the latest jScope version. Every time a user starts a
jScope application Java Web Start checks whether the Acknowledgement
local version of jScope is up-to-date, possibly down-
loading the latest version. This utility has been used This work was supported by the European Com-
originally within RFX, but now it is also available munities under the contract of Association between
to external users at http://www.igi.pd.cnr.it/wwwexp/ EURATOM/ENEA. The views and opinions expressed
technologies/MDSplusTools/jScopeDownload.html. herein do not necessarily reflect those of the European
Some users installed jScope also in their personal Commission.
PC at home. To guarantee security in data access, and
avoiding therefore punching holes in the RFX firewall,
the secure shell (ssh) tunnelling option has been added References
to jScope. With ssh tunnelling, a local port can be con-
[1] T.W. Fredian, J.A. Stillerman, MDSplus. Current developments
figured such as if it were a remote connection, being
and future directions, Fusion Eng. Technol. 60 (2002) 229–233.
communication handled by ssh in a secure way. [2] O. Barana, A. Luchetta, G. Manduchi, C. Taliercio, Recent devel-
opments of the RFX control and data acquisition system, Fusion
Eng. Technol. 71 (2004) 95–99.
5. Conclusions [3] SBS Tecnologies, Inc., CT7 Datasheet at http://www.sbs.
com/products/73/.
[4] INCAA Computers BV. DIO2 timing device at http://www.
The paper reported the experience gained after about incaacomputers.com/products/pdf/dio2-web.pdf.
1 year of operation at RFX-mod, using new hardware [5] INCAA Computers BV. TR10 Transient Recorder at http://www.
architecture and novel software tools. The good per- incaacomputers.com/products/pdf/tr10-web.pdf.
formance of many MDSplus tools did not represent [6] T.W. Fredian, M. Greenwald, J.A. Stillerman, Migration of alca-
tor C-Mod computer infrastructure to Linux, Fusion Eng. Tech-
a surprise because of the successful experiences in
nol. 71 (2004) 89–93.
the usage of MDSplus in several machines. The pecu- [7] B.P. Duval, X. Llobet, P.F. Isoz, J.B. Lister, B. Marletaz, Ph.
liar aspect of our application is the extensive usage of Marmillod, J.-M. Moret, Evolution not revolution in the TCV
Java tools in a demanding environment. Previously, the tokamak control and acquisition system, Fusion Eng. Des. 56–57
usage of Java at RFX had been limited to test cases and (2001) 1023–1028.
[8] O. Barana, A. Luchetta, G. Manduchi, C. Taliercio, Java devel-
small applications. Our experience has been so posi-
opment in MDSplus, Fusion Eng. Technol. 60 (2002) 311–
tive that we would recommend using extensively Java 317.
in the development of data acquisition systems. Java [9] O. Barana, A. Luchetta, G. Manduchi, C. Taliercio, A general-
cannot of course replace every component: low level purpose java tool for action dispatching and supervision in
data access and intensive computation represent crit- nuclear fusion experiments, IEEE Trans. Nucl. Sci. 49 (2) (2002).

You might also like