• Aucun résultat trouvé

Integrating OPC data into GSN infrastructures

N/A
N/A
Protected

Academic year: 2021

Partager "Integrating OPC data into GSN infrastructures"

Copied!
29
0
0

Texte intégral

(1)

HAL Id: hal-00211831

https://hal.archives-ouvertes.fr/hal-00211831

Submitted on 22 Jan 2008

HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Eric Benoit, Marc Philippe Huget, Patrice Moreaux, Olivier Passalacqua

To cite this version:

Eric Benoit, Marc Philippe Huget, Patrice Moreaux, Olivier Passalacqua. Integrating OPC data into

GSN infrastructures. 2007. �hal-00211831�

(2)

Infrastrutures

Design and implementation of an OPC-GSN wrapper

É. Benoit, M.-P. Huget, P. Moreaux, O. Passalaqua

BP 80439

74944ANNECY LE VIEUX Cedex

FRANCE

Researh Report 2007-10-01

otober 2007

(3)

Nousprésentons laoneptionetledéveloppement d'unomposantlogiield'interfae entre

desdonnéesauformatOLEforProessControl(OPC)etl'infrastrutureGlobalSensorNetwork

(GSN) de gestionde données de apteurs. Cette interfae, dénomméewrapper dansle ontexte

GSN, ommunique en mode Data Aess ave un serveur OPC et onvertit les données reçues

au format interne deGSN,selon diérentsmodestemporels.

Cetravailestréalisé dansleadred'unethèse surleontrle dessystèmesrépartisdefusion

d'information. Le omposant que nous avons développé permet d'injeter des données OPC,

ommedesmesuresou desinformation d'étatd'unproessusindustriel, dansunsystèmeréparti

de fusion d'informations implantésurune infrastruture GSN.

Ce omposant se omporte omme un lient du serveur OPC. Programmé en Java et basé

sur le projet Opensada Utgard, il peut être déployé sur tout noeud de alul aeptant une

mahinevirtuelle Java. Lestests que nousavonsréalisés montrent laonformité du omposant

aux spéiations Data Aess 2.05a du standard OPC ainsi que la disponibilité des diérents

modestemporels.

Abstrat

We present the design and theimplementation of an interfae software omponent between

OLEforProessControl(OPC)formatteddataandtheGlobalSensorNetwork(GSN)framework

for management of data from sensors. This interfae, named wrapper in the GSN ontext,

ommuniates in Data Aess mode withan OPC serverand onverts thereeived data to the

internal GSN format,aordingto several temporal modes.

Thisworkis realisedintheontext ofa Ph.D. Thesisabout theontrol ofdistributedinfor-

mation fusion systems. The omponent we have developed allows injetion of OPC data - like

measurements or industrial proesses states information - into a distributed information fusion

systemdeployed inaGSN framework.

The omponent behaves as a lient of the OPC server. Developed in Java and based on

the Opensaa Utgard, it an be deployed on any omputation node supporting a Java virtual

mahine. Theexperimentswe didshowtheomponent onformityaordingtotheDataAess

2.05a speiation oftheOPC standard and tothetemporal modes.

(4)

1 Introdution 1

2 GSN 1

2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2.2 Behaviour ofGSN omponents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 OPC 4 3.1 Introdution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.2 Illustrative example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3.3 Communiation modesinOPC systems . . . . . . . . . . . . . . . . . . . . . . . 5

3.4 Itemontent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.5 COM-DCOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.6 OPC simulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 OPC integration inGSN 7 4.1 Timed semantis ofdatatransferfrom OPC toGSN . . . . . . . . . . . . . . . . 7

4.2 Implementation arhitetures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.3 OPC-GSNwrappersoftware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5 Experiments 11 5.1 OPC DA ompatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.2 Periodi produtionmode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.3 Prodution modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

6 Conlusion 15 A OPC-GSN Wrapper User's manual 16 A.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A.2.1 OPC-GSN wrapper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A.2.2 Opensada Utgard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

A.2.3 Registeringthe OPC-GSNwrapper into GSN . . . . . . . . . . . . . . . . 17

A.2.4 OPC-GSN parameters les . . . . . . . . . . . . . . . . . . . . . . . . . . 17

A.2.5 Cheking network properties. . . . . . . . . . . . . . . . . . . . . . . . . . 17

A.3 Runninga GSNore withtheOPC-GSNwrapper. . . . . . . . . . . . . . . . . . 17

A.3.1 Classpathand GNSlaunhing . . . . . . . . . . . . . . . . . . . . . . . . . 17

A.3.2 Using the OPC-GSNwrapperinsidea VirtualSensor . . . . . . . . . . . . 18

A.4 OPC-GSNwrapperbehaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

A.4.1 Prodution modesand update period. . . . . . . . . . . . . . . . . . . . . 18

A.4.2 OPC to GSNdatatype mapping . . . . . . . . . . . . . . . . . . . . . . . 19

A.4.3 OPC-GSN wrapperStreamElement format . . . . . . . . . . . . . . . . . 19

A.5 OPC-GSNwrapperand VirtualSensors . . . . . . . . . . . . . . . . . . . . . . . 19

Referenes 24 List of Figures 1 Virtual sensorstruture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Example ofan OPC basedsystem . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Funtional viewof theonverter. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Conversion modesfrom OPCvalues to GSNStreamElements . . . . . . . . . . . 8

(5)

7 OPC DA ompatibility: experiment onguration . . . . . . . . . . . . . . . . . . 11

8 DA ompatibility: onverted item values generated by the simulators displayed

bythe GSNWEB interfae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

9 UpdateratetestsinPPMandtwoprodutionmodestests: experimentonguration 13

10 Impat ofthewrapperupdateratedisplayed bytheGSNWEB interfae . . . . 14

11 The twoprodution modesdisplayed bytheGSNWebinterfae . . . . . . . . . 14

List of Tables

1 GSN datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Data typemapping between OPC,Java andGSN . . . . . . . . . . . . . . . . . 10

3 Data typemapping between OPC,Java andGSN . . . . . . . . . . . . . . . . . 19

(6)

1 Introdution

Lastdeadehasseenmoreandmoreappliationsbasedoninformationfusion. Theseappliations

range from military domain, suh as target detetion, to everyday life withhouse equipments.

Morover industrial workshops use an inreasing number of various sensors for mahine ontrol

as well as for information proesses. It is then interesting to allow these information systems

to benetfrominformation fusionapabilities. In this perspetive,we will haveto interonnet

industrial datasystemswithInformation FusionSystems(IFS).

Ononesidewe havethe areaofindustrialdatasystems,where theOLEforProess Control

standard (OPC) [OPC ℄ islargely deployed sine the mid'90s and this standard isontinuously

evolving. OPC allows interonnetion of data soures and data sink through ommuniation

managers alledOPC servers. Data soures and sinktermedasOPC lients maybe industrial

equipments, measure devies, alarm buttons, et. Although last version of the OPC standard

introduesommuniationbasedonIntranetandInternetprotools,alargepartofinstalledOPC

networksusetheCOM/DCOMinterationmodeldevelopedinMirosoftWindowsenvironments.

Onthe another side,there exista lotof IFS, either aademi or ommerial. Theyaddress

very dierent kindsof datasouresranging fromlowpowersensorsto huge databases. Software

and hardware IFS vary also largely. Some systems are very speialized, some are able to be

deployedonmanykindsofproessingnodes. Intheperspetiveofourresearhativities, weare

usingtheGlobalSensorNetwork(GSN)[Ali07℄asanexperimentalIFS.GSNisaresearhprojet

of the LSIR researh laboratory (EPFL, Lausanne, Switzerland) developed inJava,allowing us

toquiklydeployasimpleIFSonseveralomputers. GSNisalreadyequippedwithseveralinput

onverters (termed wrappers) for onnetion of various data soures to a GSN infrastruture.

However,there existno wrapperfor onnetingOPC data souresto GSN.

Wepresentinthisreport,thedesignandtheimplementationofaGSNwrapperforonnetion

of OPC datasouresto aGSN node.

ThereexistseveralapproahestoonnetOPCserverstoGSN.Sinewewillmostlydealwith

installedOPCsystems,wehavehosennottoimpattheOPConguration. Consequently,our

wrapperbehavesexatlyasan OPClient getting datafromone OPCserverinaCOM-DCOM

ontext. It then formats these data in the GSN data format (termed StreamElement in the

GSN ontext). Implementation of the wrapper is written in Java and is basedthe open-soure

OpensadaUtgard projet[CCJ06℄.

Theorganization ofthereportis thefollowing. Setion 2presentsthemain featuresandthe

software arhiteture of the GSN system. Setion 3 realls the OPC standard and provides a

simple illustrative example. We expose the design and the implementation of our wrapper in

Setion 4. WehaveexperimentedourOPC-GSNwrapperandresultsarepresentedinSetion5.

Setion 6 summarizes our workand proposes futurework.

2 GSN

2.1 Overview

The Global Sensor Network projet (GSN) [KMA07a, KMA07b ℄ isa middleware supported by

severalteamsofresearhers anddevelopers. Itspurposeisto getdatafromvarioussouressuh

as sensor networks, and to proess them through funtional nodes. A general GSN system is

made of several nodes we all GSN ore (nodes) and sensor networks onneted to these GSN

ores. SeveralGSNoresmayrunonaomputerormaybeinteronnetedthroughanunderlying

(7)

Figure 1: Virtual sensorstruture

GSN datatype Desription

CHAR Astring ofxedlength

VARCHAR Astring ofvariablelength

TINYINT An8-bit signed integer value

(range: -128to 127)

SMALLINT A16-bit signed integer value

(range: -32768to 32767)

INTEGER A32-bit signed integer value

(range: -2147483648 to 2147483647)

BIGINT A64-bit signed integer value

(range: -9223372036854775808 to 9223372036854775807)

DOUBLE A64-bit preision oating pointvalue

(idential tothe Java doubletype)

BINARY Avariablesized binaryobjet

Table1: GSNdata types

network of omputers. AGSN oreis a Java program running insideone Java Virtualmahine

(JVM). Eah ore has a default data-base system used to store and to proess information. A

detailed presentation of GSNis given in[Ali07℄.

Wrapper, virtual sensor and GSN ore A GSN ore manages a set of Virtual Sensors

(VSs),usuallypartiallyonneted. VSsarethemainelementsoftheGSNinformationproess. A

VS(seeFigure1)seletsinformationreeivedbyitssoures,termedwrappers inGSN,aggregates

some oftheseseleted information,optionallyappliesaspei proessingto this aggregateand

nally transmits the result to another VS or to an entity external to GSN. Wrappers are the

links between information soures outsidetheVS and theVS.Soures maybesensors networks

(outside ofGSN) oroutput ofotherVSs. Awrapperisinharge oftheommuniationwithits

soures(writteninJava,itanommuniatewithallsouresreahablefromaJavalass,ranging

from a serial onnetionto a Web servie). It formats its outputdata inGSN ompatible data

strutures termed StreamElements. Information seletion from eah wrapper is arried out by

a SQL-like query(we all ita wrapper request) and resultis stored into adata-base. Following

information aggregation is then proessed also with SQL-like queries (let us all it the global

request) on these results possiblyfrom several wrapper outputseletions. Possible spei nal

proessingandresultoutputisahievedbyaninstaneofaJavalassdenedbythedesignerof

theVS.ThisJavalassmustimplementsaJavainterfaegivenbyGSN.Alternativelytosending

output resultto anotherVS, itan displayiton various userinterfaessuhasa Web browser.

(8)

GSN StreamElement StreamElements aredataunits proessedbyGSN.Thestrutureof a

StreamElement isthefollowing:

Anarrayofstrings withthe name,thetypeandthedesriptionofeahproduedelement,

An arraywiththe valueof theprodued element,

A timestamp.

For instaneaStreamElement reordingtemperature and pressureof agiven roomwillbe:

temperature INTEGER temperature inroomB206

pressure INTEGER pressure inroom C120

25

1024

StreamElement

prodution

time(inms)

Datatypeshandled byGSN aresummarizedinTable 1

LetusemphasizethattheresultingdataowinGSNisaowof(disretetime)dataelements

(the StreamElements) even iftheinputof a wrappermaybe sustaineddata.

Example of GSN appliation Letus desribe aVS proessingdatafromtwo ameraseah

of them produing a ouple (piture,ompression rate) every minute. We use two idential

wrappers reeivingthese ouples,one for eah amera. Eah wrapper requestselets and stores

only pitures withaompression rategreaterthan 0.9. Thentheglobal request mayselet, say

themost reent piture among thelast two pitures anda Java lassouldonvert this piture

from JPEGto BMP type for instane.

VS desription JavalassesforwrappersandVSmustbeloadableatthestartingtimeofthe

GSN ore. At startup,a GSNore readthe ongurationsof its VSfrom XMLdesriptionles

(one for eah VS), and load required Java ode into its JVM. A VS desription le is divided

into three parts (wrappers used, wrapper and global requests, Java lass) and desribes the

arhiteture ofthe VS,whih requestsshould apply,whattypesofdataareproessedandwhat

is the Java lass of the VS. It also denes symboli names for the various data ows managed

bytheVS andits wrappers.

2.2 Behaviour of GSN omponents

InteronnetionsbetweenwrappersandVSrequirethedesignersofGSNtodeneapoliyabout

whih VS and wrappers are eetively able to produe data and StreamElements at anytime.

Although not learly statedinGSNpubliations, this impliesto identify twologial statesfora

wrapperor aVS:

not alive: inthis state thewrapperor the VSis either unavailable or nomore usable.

ready: inthis state thewrapperor theVS is ableto reeive datafrom outsideof GSNor

StreamElements from otherVS andto sendStreamElements.

TheGSN poliystatesthatifone ofthewrappers ofaVS

v

isnot alive then

v

is alsonot alive.

MoreoverifawrapperannotgetdatafromitssoureandgeneratesanerroraughtbytheGSN

ore, then it is not alive. Finally, Java ode of wrappers and VS must be loadable at startup

time of their GSNore, otherwise theywill neverbeready.

Dynami ongurations of GSN systems A GSN oreis ontinuously aware of all XML

VS desription les in a spei diretory and it gets at startup, the list of its possible wrap-

pers in a le giving pairs (GSN wrappername, wrapper Java lass name). Java lasses of the

wrappers must be available at startup. Thus GSN annot, at this time of writing, handle dy-

nami injetion of new wrappers. However, a GSN ore user an fore it to start and stop a

(9)

Figure2: Example ofan OPC basedsystem

VS simplyby putting/removing itsXML desriptionle inthedediateddiretory. We planto

extend apabilitiesofGSNores toallowusfor insertionofnewwrappersandVSwithdierent

ongurations at run time.

3 OPC

3.1 Introdution

Objetlinkingandembeddingfor ProessControl (OPC)isasetof speiationsinitiallywrit-

tenbytheWinSEM(WindowsforSieneEngineeringandManufaturing)grouptostandardize

interfaesbetween deviesandappliations intheontextof workshopsandMirosoftWindows

Operating Systems with COM-DCOM protools. Before OPC, data exhanges were ahieved

using theprevious Mirosoft Windows standard Dynami DataExhange (DDE), but thelimi-

tationsofthis standardwerequiklyreahed. TheOPCstandard denesobjets,interfaesand

methodstoontrolandfailitatetheinteroperabilitybetweenappliationsanddevieswhihare

responsiblefor aquiring data. Informationis sent bythedevies to oneor several OPC servers

thatgroup dataand exposeit tolient appliations orother devies. Theseappliationsan be

SupervisoryControl and DataAquisition (SCADA)systemsor dediated lients. An overview

of the OPC onepts isdisussed in[Li 02℄.

Sine 1996 new OPC speiations are released and updated. Initially, data exhanges be-

tween OPC servers and lients were based on the COM-DCOM Windows Mirosoft standard.

However, interoperability with more and more various devies,not neessaryrunning on a Mi-

rosoft Windows operating system environment, leads the OPC foundation to dene a new

general OPC ontext and new ommuniation protools. This last OPC speiation [SW06 ℄,

namedUniedArhiteture (UA),isusingauniqueWebservieinterfaeandalloperationssuh

as Data Aess, Alarmand Even and others (see below for details) have been redened inthis

ontext.

3.2 Illustrative example

Letus onsidera very simpleworkshopwhere elements ofa bodyarmove ona travelling belt.

Eah element is on a pallet identied at the bottom part by a barode. A 3 axes robot must

arry out some measurements with a laser sensor on the element and the set of measurement

positions are omputed based on the ode of the element. This proess may be implemented

(gure 2) through:

An OPC serverstoringbarodes provided bythebar ode reader,

Références

Documents relatifs

Then, we devise a simple test based on the momentum balance equation, to investigate the role of horizontal gradients of gravitational potential energy in driving the deformation in

In this paper, we minimized the noise emitted from a low- Reynolds compressible two-dimensional flow past a cavity with a reduced-order optimal control approach based on POD modes..

In the following, we propose a method based on pattern structures, a generalization of FCA [8], that, given two datasets, discovers link key candidates in one pass (without iterating

Test tube tests were conducted using chitin and chitosan separately by two methods, centrifuging and shaking, to determine if chitin or chitosan could sorb the Nile Red in

In this paper, we minimized the noise emitted from a low- Reynolds compressible two-dimensional flow past a cavity with a reduced-order optimal control approach based on POD modes..

The proposed two models are based on a new influence estimation measure for Twitter that considers many influence aspects like the importance of the user in the network structure

Equational Specification of Visual Servoing Two main approaches are currently used in robot control based on visual data [50]: the position-based control which is achieved by

Using the silhouette index, we demonstrate that the minimax distance is more suitable to identify clusters in raw hyperspectral data than two other graph-based similarity