espen&krogh,&ceo&prediktor,&norges&rep.&opc ......opc kurs - del 1 17...
TRANSCRIPT
OPC UA
Espen Krogh, CEO Prediktor, Norges rep. OPC Foundation OPC UA Kurs
About Prediktor
600 + solutions installed since 1995
Norway -‐ Fredrikstad (HQ)
China
France
54
Employees and Kongsberg Maritime
Solutions: MES, APC, OM
Software: OPC, time-‐series, analysis, CM
Instruments: fat/water/protein measurements
Well-‐established
A global organisation
Employees
Stable ownership
Business areas
Solutions BU example: MES - Manufacturing Executions System
§ Production support and optimization system
§ Immediate answers to: ú Bottlnecks ú Quality deviations
ú Efficiency and yield
§ Production tracking
§ Rawmaterial optimization
§ etc…
“Factories digital nervous system”
Software BU example: Ormen Lange Flow Assurance System (FAS)
§ Flow Assurance System: ú Surveilance and prediction of operational
conditions in O&G facilities
ú Advanced realtime simulation
§ Ormen Lange project:
ú Norways largest single investment ever ú The world s most advanced FAS
ú All SW licenses in the system, except OLGA, from Prediktor
ú Prediktor deliver SW infrastructure and MPC based choke control appliation
Instruments BU examples
Nortura Malt kjøtt
Lactalis Camembert
Nestlé kattemat
Fôr Felleskjøpet
Kjøtt Taradellas
Kjøtt Lithells
Program § Intro: motivasjon, historie og organisasjon
§ OPC Classic
§ OPC UA
§ Nytt i OPC UA vs OPC Classic
§ Informasjonsmodeller
§ OPC UA -‐ teknisk oversikt
7
Motivasjon, historie og organisasjon
From electrons to interoperability
8
Data Information
Interoperability
Electrons
Plug and play interoperability
9
OPC: Utfordringen
10
Presentasjons lag Applikasjons lag Data lag
Prosessdata
Alarmer og Hendelser
Tidsserier
Data Analyse
Regulering og styring
Simulering
Trender og plott
Operatør skjermer
Rapporter
Leverandør X Generasjon N
Leverandør Y Generasjon N
Leverandør Z Generasjon N
OPC: Løsningen
11
Presentasjons lag Applikasjons lag Data lag
Prosessdata
Alarmer og Hendelser
Tidsserier
Data Analyse
Regulering og styring
Simulering
Trender og plott
Operatør skjermer
Rapporter
OPC OPC XML .net
OPC Foundation
§ OPC Foundation is an arena for end-‐users, vendors and research innstitutions to meet, discuss and implement interoperability standards
12
Productivity Industry standard Manufacturer-‐independent Interoperability Reliability
Open 450 members Platform-‐neutral All areas of application All connections
Collaboration Device Integration IEC 61131-‐3 / PLCopen Analyzer Device Integration ISA-‐95, ISA-‐88 MTConnect Smard Grid Field Device Integration EDDL and FDT
OPC Foundation § Etablert 1996 – fra WINSEM
§ Uavhengig organisasjon
§ Hoved formål: ú Besørge interoperabilitiet mellom systemer-‐enheter og programvare på
alle nivåer
§ Leverer hovedsakelig spesifikasjoner (papir) – ikke SW
§ Medlemskap åpent for alle ú Avgift avhengig av org omsetningsstørrelse
13
0 10 20 30 40 50 60 70
Kroatia Bulgaria Serbia Turkey Hvite russland Romania Nederland Spania Polen Tsjekkia Irland Slovakia Italia Storbritannia Belgia Norge Danmark Finland Sverige Russland Østerrike Sveits Frankrike Tyskland
Status 2012: 463 Medlems bedrifter
14
Europa 216
Japan 28
Nord Amerika 151
Kina 29
Brasil 5
Australia 6
Syd Afrika 7
Andre 18
1997 Prediktor 2000 Baze Technology 2001 Institute For Energiteknikk 2003 Kongsberg Maritime 2010 Statoil 2011 University of Tromsø 2012 Cybernetica 2012 ITIS A/S 2012 Innova AS
15
OPC Classic
OPC Kurs - Del 1 16 Prediktor as
Classic OPC teknologi stack
OPC Server
DCOM
TCP-IP / UDP IPX / HTTP
OPC Client C/C++ Java VB
Delphi
RPC
OPC Kurs - Del 1 17 Prediktor as
OPC Data Access
§ Lesing av nåverdier f.eks: ú Måleinstrumenter/sensorer ú Styresignaler ú Beregnede verdier
§ Skriving av nåverdier f.eks: ú Settpunkt i regulator ú Startkriterier i logikk programmer
§ Verdier leses fra såkalte OPC Items ú Value – int/float/bool/text/arrays ú Quality -‐ kan jeg stole på at verdien er riktig? ú Timestamp -‐ tidspunkt verdien gjelder for
§ Items legges i grupper for abonnementsoppsett § OPC Items har et navn i et navnerom og en unik ItemID (text)
OPC DA - dynamikk i objekt modell
OPC Gruppe 1
OPC Gruppe 2
Root
OPC Item 1a
OPC Item 1b
OPC Item 2a
OPC Item 2b
OPC Server Obj
OPC Klient
Node a
Node b
Node c
Leaf 1
Leaf 2
Leaf 3
Leaf 4
Leaf 5
Leaf 6
Navnerom
OPC Name Space Browser
OPC Kurs - Del 1 19 Prediktor as
OPC Alarms & Events
§ Eksponering av alarmlister fra et system til et annet § Event typer:
ú Simple Eksempel: en komponent feil meldt av systemet
ú Condition – (prosessalarmer) Eventer er assosiert med betingelser Eventer er tranisisjoner inn og ut av tilstander representert av
Conditions og SubConditions Eksempel: FIC101 har oppnådd NivåAlarm Condition med HighAlarm
som SubCondition ú Tracking – (auditing)
Ikke assosiert med betingelser Hendelser rundt operatørers interaksjon med mål objekter Eksempel: Setpunkt for FIC101 ble endret av operatørX
OPC Kurs - Del 1 20 Prediktor as
Tilstandsmaskin for en OPC condition
Active-Unacked-Enabled
Inactive-Acked-Enabled
Inactive-Unacked-Enabled
Active-Acked-Enabled
Becomes Active Send ”Condition active”
notification
Invalid Ack Received Ignore
Becomes Active Send ”Condition Active”
notification
Becomes Inactive Send ”Condition inactive”
notification
Disabled
Disable Received Send ”Disabled”
notification
Enabled, ...
(For all enabled states)
Sub-condition changes Send notfication of new sub-condition
Enable Received Send “Enabled”
Notification
Sub-condition changes Send notfication of new sub-condition
Valid Ack Received Send ”Acknowledged”
notification
Quality changes Send ”Quality Changed”
notification
Invalid Ack Received Ignore
Becomes Inactive Send ”Condition
inactive” notification
Valid Ack Received Send ”Acknowledged”
notification
OPC Kurs - Del 1 21 Prediktor as
OPC Historical Data Access (HDA)
§ Lesing/skriving av historiske verdier ú Trender av målepunkter
§ Enkel bearbeiding av historiske data ú Aggregater med statistiske funksjoner
§ Eksponerer et standard api mot databaseklienter
Eksempel OPC HDA klient
OPC Kurs -‐ Del 1 22
OPC UA erstatter tidligere DCOM/XML OPC
23
OPC UA
OPC Alarms & Events
(AE)
OPC Data Access
(DA)
OPC Historical Data Access
(HDA)
OPC Common
OPC Batch
OPC XML
OPC DA Auto
OPC AE Auto
OPC HDA Auto
OPC Batch Auto
OPC Security
OPC Command
OPC Data Exchange
OPC Complex Data
24
OPC UA
OPC UA Spesifikasjon
§ Utarbeidet i OPC Foundation 2004-‐2009
§ 12 del-‐dokumenter, 1-‐13 (-‐12) ú Kun del 1 er gratis ú Del 4 er den som er viktigst å lese
§ 1000+ sider med teknisk dokumentasjon
§ + companion standards PLCOpen, S95, DI, ADI, FDT, etc
25
OPC UA dokument struktur
§ Kjernespesifikasjoner ú Part 1 – Concepts ú Part 2 – Security Model ú Part 3 – Address Space Model ú Part 4 – Services ú Part 5 – Information Model ú Part 6 – Mappings ú Part 7 – Profiles
§ Aksesstype spesifikasjoner ú Part 8 – Data Access ú Part 9 -‐ Alarms and Conditions ú Part 10-‐ Programs ú Part 11 – Historical Access
§ Utility spesifikasjoner ú Part 12 – Discovery ú Part 13 – Aggregates
26
...men i bunn og grunn ikke mere enn dette – 37 RPC kall § Discovery
§ -‐ GetEndpoints
§ -‐ RegisterServer
§ -‐ FindServers
§
§ Session
§ -‐ CreateSession
§ -‐ ActivateSession
§ -‐ CloseSession
§ -‐ Cancel
§
§ Subscription
§ -‐ CreateSubscription
§ -‐ ModifySubscription
§ -‐ SetPublishingMode
§ -‐ Publish
§ -‐ Republish
§ -‐ TransferSubscriptions
§ -‐ DeleteSubscriptions
§ View
§ -‐ Browse
§ -‐ BrowseNext
§ -‐ TranslateBrowsePathsToNodeids
§ -‐ RegisterNodes
§ -‐ UnregisterNodes
§ Attribute
§ -‐ Read
§ -‐ Write
§ -‐ HistoryRead
§ -‐ HistoryUpdate
§
§ MonitoredItem
§ -‐ CreateMonitoredItems
§ -‐ ModifyMonitoredItems
§ -‐ SetMonitoringMode
§ -‐ SetTriggering
§ -‐ DeleteMonitoredItems
§ Method
§ -‐ Call
§
§ NodeManagement
§ -‐ AddNodes
§ -‐ AddReferences
§ -‐ DeleteNodes
§ -‐ DeleteReferences
§
§ Query
§ -‐ QueryFirst
§ -‐ QueryNext
§
§ SecureChannel
§ -‐ OpenSecureChannel
§ -‐ CloseSecureChannel
27
28
Nytt i OPC UA vs OPC Classic
Alle spesifikasjone samlet i en
29
OPC UA Klient
Før
Nå OPC UA Server
OPC Klient (DCOM basert)
OPC DA Server
OPC HDA Server
OPC AE Server
Brannmur/internett vennlig
§ Før: ú Å åpne for DCOM gjennom brannmur krevde et sollid hull i brannmuren ú Umulig å rute over internett
§ Nå: ú Kun et nålestikk i brannmur med UA binary, ingen hull med UA på W3C stack ú Ruter fint over internett
30
OPC UA Klient
OPC UA Server
Kryss-plattform
§ OPC UA kan implementeres på hvilken som helst plattform med en ANSI C compiler og en TCP IP stack implementasjon
§ Implementering allerede gjort på bl.a.: ú Linux ú Mac ú Windows ú VxWorks ú Embedded ú Etc
OPC server PC ikke nødvendig lenger
OPC Server Levrandør X
Fysisk utstyr
IO enhet
OPC Klient applikasjon fra Leverandør Y
OPC UA
Pålitelig kommunikasjon
OPC UA Client (active)
OPC UA Server (active)
OPC UA Klient
(stand by)
OPC UA Server
(stand by)
Device/application exposed with OPC
UA
§ Legacy OPC: ú Nothing (proprietary vendor specific extensions)
§ OPC UA: ú Fail-‐over redundancy ú Supports spooling, buffring pacages on bad transmission, and retransmit when
transmission OK
En protokoll for alt fra embedded til enterprise nivå kommunikasjon
34
OPC UA
35
Informasjonsmodeller
Informasjonsmodeller definisjon
§ Wikipedia:
An information model in software engineering is a representation of concepts, relationships, constraints, rules, and operations to specify data semantics for a chosen domain of discourse. It can provide sharable, stable, and organized structure of information requirements for the domain context.
36
Vi bruker alle informasjonsmodeller
§ Verden er for kompleks for oss
§ Vi forenkler vår oppfatning av virkeligheten vha informasjonsmodeller
§ Nå et eksempel:
37
Et sett m virkelige, levende personer
38
Anna
Tor
Torild
Petter
Per
Kåre
Svein
Laila
Nils
Informasjonsmodell observert av vaktmester Terje
Anna
Tor
Gunnar
Torild
Petter
Per
Otto
Kåre
Svein
Laila
Nils
Team A Wing
Team B Match
Beck Beck
Captain Keeper
Line
Participates
Wing
Coach
Manager
Participates
Spectator
Spectator
? Fru Rygge
Vaktmester Terje
Informasjonsmodell for de same entitetene observer av nabofru Rygge
40
Anna
Tor
Gunnar
Torild
Petter
Per
Otto
Kåre
Svein
Laila
Nils
Family 2 Vandalist
Family 1
Unknown Son
Occasional guest
Daughter Frequent guest
Son Father
Mother
Neighbour
Lives in
Son
Neigh-‐bourhood
Lives in Mother
Lover
Friend
Girlfriend
Vi kan konkludere
§ De same virkelige ting kan ta del I forskjellige informasjonsmodeller
§ Modellene er ofte utvidet med abstrakte objekter, slik som match og neighborhood, og vi kobler objekter med typede relasjoner
§ Ingen modell er mere riktig enn de andre, da hver modell brukes for forskjellige formål
§ Forskjellige modeller kan eksistere samtidig
41
Definisjon av informasjonsmodeller, er essensielt for avansert interoperabilitet § Computer systemer broker også informasjonsmodeller for å
kommunisere
§ Eksempler på informasjonsmodeller fra industrien:
ú S-‐95: Describes general structures in manufacturing companies, like process topologies, material structures and activity structures
ú S-‐88: Description of batch processes, recipes and batch activities ú PLCOpen: Description of control logic in sequence controlled
systems ú OpenO&M (MIMOSA): Description of structures for maintenance
and operations ú WITSML: Descriptions of data structures connected to wells from
drilling operations
42
Data vs økende semantisk informasjon
140.3 Quantity: pressure
Unit: bara
Name: PT-‐18-‐1637A:X
Description: production control valve
6.8 Quantity: pressure
Unit: bara
Name: PT-‐18-‐1642:X
Description: production control valve
upstream to
pipeline A
43
For kommunikasjon
§ …søker vi interoperabilitet… ú På tvers av disipliner ú Gjennom hierarkier ú På tvers av selskaper
§ …for mere og mere komplekse oppgaver… § …med mere og mere data.
§ Et fokus på informasjonsmodeller for varierende formål vil være en god strategi for å håndtere interoperabilitetesutfordringen
44
OPC UA and information models
§ OPC UA is the only real-‐time communication protocol that has been designed to host foreign information models
§ OPC UA clearly separates the protocol stack from the information model building capability
§ OPC UA servers can expose different simultaneous information models at the same time
§ OPC UA facilitates incremental strategies on information models ú A simple client can access all information in any UA server, even though he
doesn’t understand the semantics in the expressed information models ú A client can become more and more advanced as time goes by ú A server can incrementally implement support for more and more
information models to facilitate future integration requirements
45
Today: Bilaterale communication strategies
Production system 1
IMS Vend. A
Enterprise ERP Vend B
Production system 2
IMS Vend. A
i.e. B2MML
i.e. B2MML
Asset Mgt Vend C
? Prop vend. A/C
Integrated Operations Vend D
? Prop vend. A/D
Production system 3
IMS C Vend E
? ? ?
Arrows are never ending
integration projects
46
We need: Multilaterale communication strategies
Production system 1
IMS Vend . A
Enterprise ERP Vend B
Production system 2
IMS Vend. A
Asset Mgt Vend C
Industry Integrated Operations Vend D
Production system 3
IMS C Vend E
Std ERP Model
Std maint. Model
Std Industry Model
Std ERP Model
Std maint. Model
Std Industry Model
Std ERP Model
Std maint. Model
Std Industry Model
Std Industry Model Std maint.Model Std ERP Model
OPC UA
Arrows between standard software packages from
vendors
47
48
OPC UA - teknisk oversikt
UA Spesifikasjonslag
49
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
Transport og protokoll binding
§ Protokoll stacker for forskjellige use case’r ú API’er uavhengig av protokoll ú Web Services for enterprise aksess ú Binary TCP protocol for sanntids kommunikasjon
ú Plattform uavhengig implementeringer
§ Robust kommunikasjon ú Sekvens nummerering
ú Sesjon keep-‐alive mekanisme ú Synkronisering vha bufring og spooling ú Redundans støtte
§ Innebygget sikkerhet ú Applikasjons autentisering ú Bruker autentisering ú Signerte og krypterte meldinger ú Integrert audit konsept
50
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
OPC UA – protocol stack alternativer
HTTP/HTTPS
SOAP 1.2
WS Secure Conversation
UA XML UA Binary
UA Secure Conversation
UA TCP
TCP/IP
XML WS
XML WS
Native with
SOAP HTT
P
Native Bina
ry
Message Transport Layer
Secure Channel Layer
Message Encoding Layer
Performance on embedded devices – example Prediktor UA toolkit § ARMv5, 100MHz, 64MB ram, linux 2.6.25
§ 100 Mb dedicated network between client and server
§ Read performance (poll):
§ Write performance:
52
Node count Min [msec] Max [msec] Avg. [msec] Reads/sec 1 4.5 15.2 5.5 181.8 10 7.2 15.9 8.1 1234.6 100 32.7 48.2 36.1 2770.1 1000 291.0 331.1 307.9 3247.8
Node count Min [msec] Max [msec] Avg. [msec] Writes/sec 1 4.5 7.0 5.2 192.3 10 6.8 13.0 7.6 1315.8 100 30.1 45.0 32.0 3125.0 1000 252.4 285.2 266.3 3755.2
Security
§ Use of OPC UA security must be embedded in a security management system to provide meaningful security
§ OPC UA is secure-‐by-‐design and addresses security concerns by providing ú authentication of
Users Application instances (Software)
ú Confidentiality and integrity by signing and encrypting messages ú Availability by minimum processing before authentication ú Auditability by defined audit events for OPC UA operations
§ OPC UA allows to setup different levels of security § OPC UA certificate management can be
ú integrated into existing infrastructure of the site or ú newly set up based on requirements
53
OPC UA Base Services – OPC UA API
§ Protokoll uavhengeig OPC UA API
§ Tjenester for ú Discover Servers and Endpoints
ú Browse Server Address Space Instances Type System
ú Read and Write current data ú Read History of Data and Events ú Call Methods ú Subscribe for
Data Changes Events
ú Create / Delete Nodes and References
§ Generic Services ú No feature specific extensions ú Features added through Information Models
54
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
Standard innebygde informasjons modeller
§ Data Acces ú Representation of Process Variables ú E.g. AnalogItemType with unit and range
§ Alarms & Conditions ú Representation of Process Alarm Systems ú State machines for Alarm states ú Events for state changes ú Methods feedback like Acknowledge
§ Historical Access ú Information about historized data and events
§ Programs ú Representation of programs ú Manipulate programs like start, stop ú State of a program execution ú Result data handling
55
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
OPC UA companion modeller
§ Standard Informatsjonsmodeller ú Domene-‐spesifikke modeller ú Industri-‐spesifikke modeller
§ Utarbeides ved ú å samarbeide med andre standardiserings
organisasjoner ú å adressere spesielle domenespesifikke behov
56
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
57
DI
ADI PLCOpen
DA
FDI*
HA AC Prog
MES*
S 95*
* in progress
OPC UA informasjonsmodeller så langt
OPC UA base model
Leverandør spesifikke modeller
§ For å eksponere eksisterende semantiske modeler vha UA
§ For å eksponere et domene som ikke er definert som en standard ennå i OPC UA
§ For å bruke OPC UA som en implementeringsteknologi for egne/produkt-‐interne behov for å konseptualisere semantiske modeller
58
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
Inkrementell/iterativ strategi i å implementere OPC UA
§ Klienter laget for Base Services kan fremdeles aksessere informasjon i høyere lag
§ Inkrementelle og iterative utviklingsstrategier kan brukes for klienter
§ Servere kan legge på informasjonsmodeller etter som de blir definert, og det er behov for implementering
59
UA Stack
UA Base Services
Prog HA AC DA
Standard informasjonsmodeller, OPC
Foundation og andre
Leverandør spesifikke modeller
Nytt i UA v 1.02 (høst 2012)
§ Standard XML skjema for adresserom ú Offline browsing ú Addresserom import og eksport ú Standard lagringsformat for informasjons modeller
§ Filoverføring mulig med FileType objekt
§ HTTPs basert protokoll i stacken § Nye katalog tjenester
ú Local Directory Service (i UA v 1) ú Global Directory Service (tjener på port 4840) ú Ad-‐hoc discovery (ingen navnetjener)
§ Forbedret redundans modus og nettverksredundans
60