it is even possible to create one abstract element from
a set of devices; in this abstract element its measures
could be the calculated value from any of its channels.
It is easy to build a data base of the most used de-
vices because it is possible to model a device by using
XML labels. In this way, modelling an installation
simplifies to selecting the devices that integrate the
installation and to assign values to its attributes.
Sometimes it is possible that one device consists
of several smaller devices that have to be modelled.
This can be done by grouping these devices in a set
of devices and by assigning to them the necessary at-
tributes.
3.3 The System
The system represents an installation with its devices,
its attributes and the associated channels. This is the
only information that the framework needs. From
the specifications included in the XML document, the
framework generates in runtime a structure that con-
nects to the installation and updates the measures with
the current data of the different devices. When the
framework is started the communications are begun,
and at this moment there is a one-to-one mapping be-
tween each measure attribute and the corresponding
value of the real device channel. In this way, we have
always a representation of all the device channels of
the installation.
4 THE COMMUNICATIONS
DILEMMA AND THE OPC
SOLUTION
The second step to build a monitoring program is to
describe the communications among the different de-
vices. To do this, we have used the OPC technology
(OLE for process control).
In any installation it is common to find many de-
vices of different types and manufacturers that have
different ways of communication. In order to obtain a
generic system we will have to use a general mecha-
nism to communicate with any device, irrespective of
their characteristics or the manufacturer. That is, we
must give an answer to the question of how to com-
municate with any device without modifying the sys-
tem. The OPC (OPC Foundation) technology allows
us to solve this question. With the OPC, we have es-
tablished an abstraction layer that makes it possible to
communicate any devices in a generic way. We have
built an OPC server for each device that does not de-
pend on the type of device.
The access to remote OPC servers is made by using
the Distributed Component Object Model (DCOM).
DCOM extends Microsoft’s object-oriented Compo-
nent Object Model to promote interoperation of soft-
ware objects in a distributed-heterogeneous environ-
ment, (Several, 1995), (Horstmann, 1997). A DCOM
server is a body of code that serves up particular
object types at runtime. A DCOM client calls into
a DCOM server’s exposed methods by acquiring a
pointer to one of the server object’s interface.
Once we have modelled the system we must asso-
ciate the physical channel that will supply the values
to each virtual channel. To do this, in the XML speci-
fication we add one link that indicates the OPC chan-
nel that supplies the value for the virtual channel. In
this way we connect the values of the physical devices
with our model. For example:
<measure code="MeasureCode"
ToDB="true" DBUpdateRate="0">
<function>
self.value:=
:=OPCServer.Group.OPCItem.value;
</function>
... </measure>
Sometimes it is necessary to transform a measure
from a device by using a certain function; it is possible
to do this in an easy way with the proposed scheme.
It is also possible to associate several OPC channels
with a measure of the system.
For example:
<measure code="MeasureCode"
ToDB="true" DBUpdateRate="0"> ...
<function>
self.value:=
:=OPCServer.Group.OPCItem.value+
+(OPCServer2.Group.OPCItem.value+4);
</function>
... </measure>
Hence we can build any kind of measure as a func-
tion of physical channels and numerical transforma-
tions.
A FRAMEWORK FOR THE DEVELOPMENT OF MONITORING SYSTEMS SOFTWARE
135