Control of Distributed Data Acquisition Systems Using Object

Document Sample
Control of Distributed Data Acquisition Systems Using Object Powered By Docstoc
					 Control of Distributed Data Acquisition Systems Using Object
                       Oriented Methods
                                        G. Kemmerling, M. Korten
                          Institut fur Plasmaphysik, Forschungszentrum Julich
                            EURATOM Association, 52425 Julich, Germany
                                    M. Drochner, P. Wustner, K. Zwoll
             Zentrallabor fur Elektronik, Forschungszentrum Julich, 52425 Julich, Germany

Abstract                                                 be performed from an experiment workstation via an
                                                         Ethernet-based LAN.
   EMS Experiment Message Speci cation is a ex-           The system software is logically based on MMS
ible software package, designed to build scalable dis-   ISO 9506 2 and FMS DIN 19245 3 , powerful
tributed data acquisition systems for experiments at     application layer protocols for distributed automation
the Cooler Synchrotron COSY at the Forschungszen-      systems in industry. Because it is related to physi-
trum Julich. It uses an object oriented hardware map-    cal experiments, it is called EMS Experiment Mes-
ping for control and monitoring, which is logically      sage Speci cation. EMS provides an object oriented
based on MMS and FMS standards. Access from the          client server interface to the DAQ. All front-end de-
experiment workstation is realized through TCP IP        vices and their functionality are mapped to abstract
socket communication, managed by a dedicated pro-        objects, which o er a set of services for control and
cess on the workstation. The system is now 4 years       con guration. The communication between clients
in operation and an adaption to PC technologies is       and servers is managed by a dedicated process on the
currently under development. Within the context of       workstation and is based on TCP IP sockets, using a
this upgrade, also the special communication process     proprietary protocol for exchange of data.
should be replaced by a standardized tool. The object       The system is now 4 years in operation at vari-
oriented Common Object Request Broker Architec-          ous physics experiments, but the increasing amount of
ture CORBA is seen to address the problem in an        data asks for a major revision 4 . Because of the very
adequate way.                                            limited market size of readout controllers, especially
                                                         for CAMAC and FASTBUS, and their long CPU life-
1 Introduction                                           times, a migration of the system to PC-technologies
                                                         is currently under development. Instead of expen-
The Cooler Synchrotron COSY at the Forschungszen-        sive embedded intelligent ROCs and EBs, transpar-
trum Julich is a proton accelerator and storage ring,    ent controllers with a connection to PCI PC based
designed to investigate in medium energy nuclear and     CPU boards will be used. This approach allows on a
particle physics 40 to 2500 MeV. There are several     very economical way to comply with the new demands
experiments, located at internal beam and external       by following the rapidly improving CPU performance
target positions. Depending on the physical program,     on the PC market. As operating system for the PC-
various hardware con gurations are used and even-        boards, the freely available NetBSD distribution was
trates up to some thousand events per second are         choosen, providing a homogeneous UNIX environment
achieved.                                                in the whole DAQ system.
   In order to cope with these requirements, a exi-         Within the context of this upgrade, the system
ble distributed architecture was choosen for the de-     should also be opened for a standardized access
velopment of the data acquisition DAQ 1 . The          method. By retaining the large investments in soft-
system consists of a scalable amount of digitizing       ware development of the EMS interface, the commu-
crates in CAMAC, FASTBUS and VME standards,              nication process on the workstation will be replaced by
each equipped with its own intelligent Readout Con-      the object oriented Common Object Request Broker
troller ROC, and an Eventbuilder EB crate in         Architecture CORBA 5 . Thus, the implied partic-
VME with several processors to combine and store         ular platform and protocol issues and therefore higher
experiment data as an event on tape. All intelligent     manpower requirements can be avoided.
devices use Motorola processors of the 680xx family,        The following sections describe the advantages of
running OS-9 as operating system. While the trans-       EMS and CORBA and the bene ts for a combination
fer of experiment data is established by VICbus in-      of both systems. Work is in uenced by another project
terconnections between front-end and event-building      at the Forschungszentrum Julich, where the integra-
controllers, control and monitoring of the system can    tion of a DAQ-system with CORBA has already been
shown promising results 6 .                                Whereas the Domain, Variable and Program Invoca-
                                                           tion are well known objects of MMS and FMS, the In-
2 Experiment Message Speci cation EMS                    strumentation System and the Data Output are dedi-
The central object in EMS is the Virtual Experiment        cated to the experiment's needs. The de nition of the
Device VED. It represents a ROC or an EB and acts        instrumentation system re ects the fact that an ex-
as server for clients on the experiment workstation. A     periment should normally o er a higher exibility to
VED models the externally visible behaviour of the         the user than a manufacturing device. The VED cor-
server and o ers the resources and functionality asso-     responds to the Virtual Manufacturing Device VMD
ciated with a real device for control, monitoring and      in MMS.
event data transfer. In such a way, the client process        The servers consist of the EMS-interface and hard-
on the workstation communicates not directly with          ware dependent code. The connecting link are local
di erent application programs in the distributed data      procedures, which must be programmed according to
acquisition system, but always with VEDs, providing        the application needs. A complete program is exe-
a uniform view and access, independent of the type of      cuted by a sequential interpretation of a list of local
the speci c server.                                        procedure calls, downloaded from a workstation client.
                                                           A global list of the hardware modules and their types
                                                           is stored in corresponding data structures.
                                                              Client programs on a workstation are developed
                                                           by the use of C and C++ libraries, which allows
                                            Clients        access to EMS-services via the communication pro-
                                                           cess. The communication process can manage several
                                                           client server connections at a time. In particular, it
                       EMS-                                has the following tasks:
                                                                queueing of requests from several clients for one
                                                                 server, so that the server only works on one re-
                                                                 quest at a time,
                          VED                Server             assignment of logical names to server addresses,
                                Variable                        handling of fault conditions, debugging and log-
                                                                 ging - some transport protocols e.g. OS-9 net
           Program                                               are not able to recognize unexpected breaks of

                                                                management of asynchronous messages so called
                                                                 unsolicited messages.

                                                              There are currently several client applications used
                                 Mapping                   for experiment control, based on X-Motif, InterViews
                                                           or Tcl Tk. For smaller applications and test systems,
                                                           an interactive script interface is also available.
Figure. 1. Object oriented hardware mapping in EMS         3 Upgrade of communication architecture
   As shown in g. 1, a VED contains a set of generic       The key boundary condition for the migration to PC-
objects, that help to coordinate the access to the func-   technologies was to gain improvements with preserv-
tionality represented by the speci c object. A short       ing as much as possible the existing instrumenta-
description of these objects is given below:               tion and software developments. However, the pro-
     Variable, either a single integer or an array of      prietary communication process on the workstation,
     integers in VED's memory,                             which was originally introduced to handle OS-9 short-
     Domain, a loadable image consisting of data,          comings, will be replaced by a standardized and plat-
     Program Invocation, an executable program             form independent software tool, that is able to tie the
     related to one or more domains,                       client software applications together. The CORBA
     Instrumentation System, the main building             architecture was selected for this purpose.
     block for the server, a complete functional unit         CORBA is an speci cation of a object-oriented ar-
     with a logical or physical meaning, consisting of     chitecture for distributed applications, which is de-
     one or a group of hardware modules, a set of pro-       ned by the Object Management Group OMG 7 .
     cedures e.g. for event readout, initialisation and    It combines the bene ts of object-orientation and dis-
     set-up including necessary lists,                     tributed computing and allows clients to invoke meth-
     Data Output, dedicated to a sequential data re-       ods on server objects transparently, without knowing
     cording device, a bu er or a communication link.      the object's location or the programming language
used for the implementation of the object.                  4 Conclusion
                                                            In order to validate the new concept for communi-
                                                            cation, based on the choice of CORBA, a pilot im-
                                                            plementation is currently under development. It is
                                                            to test the techniques of integrating EMS and will
                                                            have reduced but basic functionality of a VED. In a
                                                            later stage this interface will be enlarged to enable full
                                                            control and set-up from the experiment-workstation,
             Object Request Broker                          whereas for the transfer of experiment data high band-
                                                            width connections between servers are further on used.
                                                               Most implementations of CORBA do not consider
                                                            security mechanisms. Thus, servers are usually open
    VED                                                     to general access without additional authorization che-
                                                            cks, which is not acceptable in experiment control. An
Figure. 2. Communication between clients and server,        additional server, a socalled 'System' server, has been
managed by the Object Request Broker                        introduced for this purpose. It manages users access to
                                                            the system and keeps track of their individual author-
   The core of the whole architecture is the Object Re-     ities. Furthermore, it provides the necessary adresses
quest Broker ORB. The ORB is responsible for the          of VEDs in the system.
delivery of client-requests from one computer to ob-           As CORBA implementation, the freely available
jects possibly on another computer e.g. a front-end        omniORB-distribution 8 is used. omniORB is a mul-
controller as well as for the return of resulting infor-   tithreaded Object Request Broker, which is compliant
mation see gure 2. By hiding all details of data          to the IIOP protocol. It supports a simple C++ map-
transmission from the client, it facilitates the commu-     ping of IDL interfaces, which allowed us to implement
nication between clients and server. Therefore, the           rst versions of servers in a rather short time.
user can concentrate on the implementation of the
objects services and their usage in client programs,        References
avoiding all pecularities of communication. To target       1 K.Zwoll, M.Drochner, W.Erven, J.Holzer,
an object, the client only has to specify the object          H.Kopp, H.-W.Loevenich, P.Wustner,
reference, which is created when the object is created.       K.H.Watzlawik, N.Brummund, M.Karnadi,
   By usage of CORBA, the EMS-objects and data                R.Nellen, J.Stock, S.Dienel, K.H.Leege,
structures are described by interfaces in the standard-       W.Oehme, "Flexible Data Acquisition System for
ized Interface De nition Language IDL, indepen-             Experiments at COSY", IEEE Trans.Nucl.Sci.,
dent of any programming language. The mapping of              Vol 41, No. 1, pp 37-44, 1994
such interfaces to client server source code of a spe-      2 ISO9506 - Manufacturing Message Speci cation,
ci c programming language is performed by the IDL-            International Organisation for Standardization
compiler of the CORBA implementation. There are             3 Pro bus Application Layer FMS, FM7,
many CORBA implementations on the market, avail-              and LLI, DIN19245
able on almost all popular computer platforms. As           4 M.Drochner, W.Erven, P.Wustner, K.Zwoll,
language mappings of IDL, vendors usually provide             "The Second Generation of DAQ-Systems at
C++, C or Java. Thus, the introduction of CORBA               COSY", IEEE Real Time Conference 97, Beaune,
not only extends EMS to platforms and operating sys-          France, September 1997
tems not supported so far, but gives the user also          5 CORBA 2.0 IIOP Speci cation, document 97-
the possibility to choose between some programming            02-25, http: corba corbiiop.htm
languages for the client implementation. The usage          6 G.Kemmerling, M.Korten, H.Kleines, K.Zwoll,
of Java, for instance, has the advantage of building          C.Balke, M.Ephra
m, M.Koopmans,
client applications for EMS, which directly can be in-        Laat, W.Lourens, E.van der Meer, J.Venema,
serted in Web-browsers. Furthermore, with the IDL-            W.Kooijman, A.A.M.Oomens, F.Wijnoltz, "Re-
de nition of EMS a strict division of client and server       mote Experiment Monitoring and Control at the
side is achieved, resulting in a better maintenance of        TEXTOR 94 experiment", IEEE Real Time Con-
software. To guarantee the interoperability between           ference 97, Beaune, France, September 1997
ORB's from di erent vendors, CORBA speci es the             7 homepage, http:
Internet Inter-ORB Protocol IIOP. IIOP de nes the         8 ORL homepage,
transfer syntax and a set of message formats for ORB          http: front.html
interoperation just as an IDL interface de nes the pro-
tocol between an object and its clients.

Shared By: