Professional Documents
Culture Documents
Experience With RFX-mod Data Acquisition System
Experience With RFX-mod Data Acquisition System
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.
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
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).