Integrating the latest Technologies into a Java Process Control MMI
F.Momal, CERN, Geneva, Switzerland

Abstract
The LHC/IAS (equipment control) Group isdeveloping supervisory systems by means of industrial
SCADA packages. For the past four years, we haveprovided Web remote access to the data coming fromour supervisory and control systems. Combining ourfindings, an architecture and a strategy have been set-up
for a generic Java interface which offers a remote andunique access to all kinds of control data. Using theobject-oriented technology, the architecture dissociates
the data access layer from the presentation one. Thus,
the interface may be used to access different types ofdata. The data are stored in the interface together with aset of related information (acquisition date, unit, etc.).
The graphical interface is based on components which
may be stored independently and which can be accessedon demand. Attention has been given to easing theintegration of commercial components. To help nonspecialists in creating components, a graphical scripting
language has been developed.
1

TOWARDS A NEW INTERFACE

Process Control Man Machine Interfaces (PCMMI)
whether they be commercial SCADA (Supervisory
Control and Data Acquisition) packages or a home-madedevelopment, do not often stand the comparison withstandard office software in terms of user-friendliness andprogramming facilities. We see generally two kinds ofprograms: either graphical interface generators without astrong model for fetching or storing the process variables
or complete SCADA systems which are hard to extend.
It seems a good time, nowadays that everyone is testing
the usefulness of Java in this area, to try to make Javasupervisory and control packages evolve with the latest
trends in software technologies.
Making a Modern MMI
We would not accept on our office computer what westill see on control operator consoles. Why can we not
cut and paste a dial or a led from one SCADA window
to another? Why can we not save a user configuration byclicking on the floppy icon of a toolbar? The firstexamples of Java interfaces to control systems arecontained in fixed applets without even the possibility tohave two windows open at the same time.
Microsoft has popularised the notion of dividing anapplication between a document and a view. The
document holds everything linked to the intrinsic
meaning of the data whether the view contains theinformation on how the data is to be seen; a PCMMI has

exactly the same construction. On one side there is theprocess variable with its value and some related data andon the other side, the graphical representation of theprocess variable. While the handling of process variables
has specific requirements (see “real-time database”
below), all the evolutions in terms of user-friendlinessand interactivity that come nowadays with the officeapplications, may be applied to the views. For example,the operator should be able to create a new resizeable
view (seen as a new window), and by clicking around,
copy and paste parts of other views. A good way ofseeing a tree-like structure is the explorer view. It could
be useful to apply this to views which are made of
subcomponents like, for example, dials, text fields, etc.
New concepts coming from the Internet
To use Java means using the Internet facilities. Not only
the PCMMI itself may be downloaded from a remotesite, but it should be possible to open views which are
stored on some Web servers and to remotely save
operator made configurations. Hyperlinks must, ofcourse, be implemented so that the user may navigate,with a single click, between views that are stored on
different Web servers. It should be possible to access,with some kind of URLs, not only a view but also a
simple graphical component.
The success of the Web is largely due to the simplicity
of creating a Web page. The same simplicity could be
brought to PCMMI views by the definition of a welladapted scripting language1.
Java approachJava is a powerful object-oriented language whose
facilities may be efficiently used in the design of aPCMMI. Java interfaces are a good way of specifying
how the different parts of the system are to work
together, without fixing how they are implemented andthus easing cooperative development. We see at least
three main interfaces: one describing the real-time
database which is at the heart of the system, onedescribing the part which fetches the values of theprocess variables from the network and one describing
how the graphical views behave.
The Java event system is well suited for thecommunication between the real-time database and theviews and between the views’ components. Thesesoftware components should implement the JavaBean

1The existing graphical description languages are almost
never usable with a simple text editor.

standard. All classes can benefit from the Java
serialisation scheme to implement some persistency.
These different points led us to set-up a software
structure for a PCMMI in Java.
2IMPORTANT PARTS OF A JAVA MMI

Real-time Database
In order to realise, in practice, the division between theprocess variables and the views, a PCMMI should beconstructed around some kind of real-time database(RTDB) communicating with graphical views. Thiswould also ensure the coherence between the different
representations of the same process variable. The realtime database should have some knowledge about thekind of data which it handles. Together with the value ofthe process variable, a set of information known as“metadata” is to be stored. Typically, this will include
the possible range of the variable, the abnormal values,
the physical unit in which it is expressed and a status
telling whether the value is considered valid or not2.
A short-term history may also be saved in the real-time
database. It can then be accessed without fetching itfrom the network.
Java is an object-oriented language; therefore the realtime database should offer an object approach of thevariable.
PCMMI Graphical Components
The graphical part of a process control MMI may beseen as a set of representations of process variables and aset of user actuators (buttons, etc.). These
representations can be symbolic and linked to thephysically controlled element, such as the standard
representation of a valve, or can be more generic, suchas a trend curve. In either case, the representation may
often be applied to different processes. By standardising
the software structure and the behaviour of an MMI
atomic representation, one should be able to reuse others
developments and not rewrite indefinitely the codeneeded to represent a led or a pump. Component’s
technology, as defined by Sun or by Microsoft, is well
suited to MMI visual components. Any modern processcontrol MMI should use this technology to easily
integrate other developments and to gain modularity.
Sun has defined a way of developing softwarecomponents (JavaBeans[3]) and since a MMI component
shares the graphical behaviour of a JavaBean, any JavaPCMMI integrating the notion of software components
should stick with that definition. This would ensure thedurability of the developments. It will also ease the useof off-the-shelf components which may be of interest,
such as a trending component.

2In case of network failure for example, the value can’t beconsidered as valid.

Communication between components is normally madewith Java events. This is also perfectly suitable for ourkind of needs. Events, as they are described in the Java
1.1 specification, may be used to update the graphicalrepresentation of a component whenever the process
variable to which it is linked to changes. Events are also
a good way of transmitting user actions such as a mouseclick.
However, MMI components have specific constraints ifthey must be automatically linked to data in the realtime database and they must behave in a homogeneousway. Therefore, the definition of a PCMMI component
is more restrictive than simply following the JavaBean
standard. The interface we defined for our system comeswith the description of a standard behaviour. Specific
events are used and a way of saving and loading theconfiguration
files is recommended.
PCMMI
components are also asked to offer some specialised
introspection mechanism so that they may be inserted
into other PCMMI components. By following theserecommendations, a component is certain to be smoothly
inserted into the system.
A very powerful, yet simple to use, mechanism exists inJava which enables the loading of a class (which could
be a software component) at run-time and automaticallybind it to the application. This can be used to load, ondemand, the components asked for by the user from aremote repository. While lightening the application, itensures all the users that they use the latest version of
the components3. It also allows integrating newcomponents without having to restart the application.
A scripting language
Scripting is a fast and powerful way to assemble
components together and to describe how the different
software parts of a system should behave together. Mostof a process control display may be described easily witha scripting language. While it is important to have anefficient way to program components, a computing
knowledge is not required to position these components
and to connect them to the real-time database. AWYSIWYG interface is always welcome for that kind ofwork but it is never as powerful as a good, adapted
scripting language. The best example is, I believe, thesuccess of HTML. A graphical oriented and editable
scripting language is the best and easy way to describe
relations between components and even to create simple
PCMMI components. It also has the enormous advantage
to be easily generated by programs and ensures thedurability of this part of the development. This is very
seldom in SCADA systems.

3We use the same mechanism to store and load the network
drivers.

3ASSEMBLING ALL TOGETHER

We have tried to implement all the previously describedideas into a system which we developed and which isnamed “RemoteView”. It is based around a set ofinterfaces which describes how the real-time database,the network drivers and the graphical components are tobe accessed. A clear split has been made between theRTDB and the graphical representations. Severalimplementations of these interfaces have been made.
Socket, HTTP, …
The interaction between the components and the RTDB
is based on a subscription mechanism. A component
subscribes the set of process variables which it displays.
Whenever one of the variables changes, an event is sent
to the component.
Each component offers one or several ways ofrepresenting a set of process variables. We call it arepresentation type. A component loader has thefunction of finding, on demand, the Java component thatoffers a given representation type. It will do so by
scanning the component repository. This repository may
be a Web server, a database or a simple file system.

A configuration manager, which mimics a file system,
handles the remote storage and the retrieval of all theconfiguration files. It may be used by all the PCMMI
parts to save their status.
Events are used to inform the window manager of theuser actions. For example, whenever the user clicks on
the representation of one or several variables, an event isbroadcasted. Using this feature, it is easy to insert, forexample a set of variables into a trend chart or to paste acomponent into a panel of components.
Each view is inserted in a specific window with a menubar. This resembles the menu bar of any standard
application with “new”, “open” and “save” buttons.
By using an introspection mechanism, the window
manager is able to represent the views as a tree-likestructure. This facilitates the manipulation and therecombination of the views.
A graphical scripting language named dgsl (dynamicgraphic scripting language) has been defined. The dgsl
interpreter, which is a standard graphical component,
looks into the script for the RTDB variables it has tosubscribe to. Each modification in the value of a
subscribed variable launches the execution of the script.
The first release of this Java interface is now running.

Component repository
Real-time
database

LoadComponent loader
Value of process
variable has changed
Implement

Subscribe

Graphical component

Figure 1: The Graphical Components

REFERENCES[1] F.Momal, C. Pinto-Pereira, “USING WORLDWIDE-WEB FOR CONTROL SYSTEMS”,
ICALEPCS 1995, Chicago(http://wwwlhc.cern.ch/ICALEPCS95/icalep95.htm)[2] F.Momal, ”TOWARDS A NEW GENERICAPPROACH FOR WEB ACCESS TO CONTROLDATA”, ICALEPCS 1997, Beijing(http://wwwlhc.cern.ch/Docs/p005.PDF)[3] Prashant Sridharan, “JavaBeans”, Prentice Hall
PTR, 1997

Figure 2: The dgsl interpretor in its window