gb mpd 20080331 trn opc module01
DESCRIPTION
sentry OPC serverTRANSCRIPT
01 - Road Map
OPC
Saad Saeed ([email protected])Houston, TX
Revision 00: 31-Mar-2008Not
e: N
on p
pt v
ersi
ons
may
not
incl
ude
acce
ss to
link
ed re
sour
ces
and
cont
ent
GeoBalance Training Project
01 -
Roa
d M
ap2
GeoBalance
Agenda• Introduction
– OPC– The PSL’s OPC System (PSL-OPC)
• Background– A bit of History– Base technologies
• Theory of Operation & Functional Description– OPC DA– OPC HDA– OPC A&E– OPC Tunneling
• Installation• Operation• Troubleshooting & Diagnostics
01 -
Roa
d M
ap5
GeoBalance
What is OPC?
• Definition
“OPC or OLE for Process Control is a standardized protocol for
communication of data between devices and systems”
01 -
Roa
d M
ap6
GeoBalance
What is OPC? - II
• Protocol = Set of rules = Specifications
OPC Overview
OPC Unified Architecture
OPC Security OPC Common Definitions
OPC Complex Data
OPC Alarms and Events
OPC Historical Data Access OPC Commands OPC Data Access OPC XML DA
OPC Batch OPC Data eXchange
01 -
Roa
d M
ap7
GeoBalance
What OPC is NOT
• A Software Application• A Client• A Server
01 -
Roa
d M
ap8
GeoBalance
Before OPC
• Each application had it’s own driver• Proprietary data paths• Little integration• Some solutions, but …
– Data was locked
In the dark days before
01 -
Roa
d M
ap9
GeoBalance
Before OPC• Before 1990’s
– Systems used proprietary communications interfaces for access to Real Time Information
– Each new supplier’s hardware needed custom code
Modbus
Proprietary ACSII
PLC
01 -
Roa
d M
ap10
GeoBalance
Why is OPC Data Access needed?
SoftwareDriver
SoftwareDriver
SoftwareDriver
SoftwareDriver
DisplayApplication
TrendApplication
ReportApplication
01 -
Roa
d M
ap11
GeoBalance
OPC Solves the Problem
SoftwareDriver
SoftwareDriver
SoftwareDriver
SoftwareDriver
OPC OPC OPC OPC
DisplayApplication
TrendApplication
ReportApplication
OPC OPC OPC
01 -
Roa
d M
ap12
GeoBalance
OPC Vision
• Standardize on technology, not product• No proprietary formats• Universal connectivity
Along came a solution
01 -
Roa
d M
ap13
GeoBalance
Hands-on Exercise: IC
1. Start OPC Client application (“Client”)2. Connection OPC Client to an OPC Server3. Add an OPC Group
a. Use default settings4. Add OPC items (subscribe)5. View live data
Initial connection (IC)
01 -
Roa
d M
ap14
GeoBalance
Hands-on Exercise: AC
6. View group propertiesa. Set update rate to 0 ms. What happens?
7. Change the display update rate8. Connect to another OPC Server and add items
a. Is it possible?
Advanced capabilities (AC)
01 -
Roa
d M
ap15
GeoBalance
Hands-on Exercise: Questions
1. How often does data change?2. Do all values change at the same rate? Why?3. What information is available for each item?4. What data types are available?5. Where did the data type come from?6. What was the fastest update rate possible with this
OPC Server?7. Where is this value set?8. Is this rate the same for all OPC Servers?
Let’s discuss
01 -
Roa
d M
ap16
GeoBalance
OPC Technology Defined …• Published (i.e. not proprietary) industrial
specification for system interconnectivity• Based on:
– Microsoft Active X, COM/DCOM– XML– .NET
• Client / Server Architecture• What does OPC stand for
– Open Process Connectivity– OLE for Process Control– Old Programmers’ Club– OPC
01 -
Roa
d M
ap17
GeoBalance
Background
01 -
Roa
d M
ap18
GeoBalance
OPC History In the beginning
Windows 3.0
DDE
OLE
OPC Task force
OPC FoundationOPC DA 1.0
OPC HDA 1.0
OPC A&E 1.0
OPC DA 2.04
OPC DA 2.0
OPC Security 1.0
OPC XML-DA 1.0
OPC DA 3.0
OPC Commands
1.0
OPC UA Committee
OPC UA Security
Model 1.00
OPC UA HDA 1.00
01 -
Roa
d M
ap19
GeoBalance
Product-Specific Drivers
• Developed for specific product• Proprietary protocol• Manufacturer specific format
– E.g. NI MAX
01 -
Roa
d M
ap20
GeoBalance
DDE
• Dynamic Data Exchange• Share data
– Between Applications• Communication
– Windows (OS) Messages– Shared Memory
Application BApplication B
Windows Shared Memory
01 -
Roa
d M
ap21
GeoBalance
OLE
• Object Linking and Embedding• Enables
– Embedding of Objects– Linking of Objects
01 -
Roa
d M
ap22
GeoBalance
DCOM
• Distributed Component Object Model• Enables communication of software components
across a network
01 -
Roa
d M
ap23
GeoBalance
COM/DCOM and OPC• Applications use
– COM to communicate on a single User Account– DCOM to communicated between User Accounts
• COM is always faster than DCOM• COM enables processes to communicate with each
other• DCOM enables programmers to distribute COM• OPC is an instance of COM
– OPC apps are COM apps– OPC Server is a COM server– OPC Client is a COM client
01 -
Roa
d M
ap24
GeoBalance
COM Object Identification
• Global Unique Identifier (GUID)– Also known as ClassID (CLSID) or AppID– 128 bit – Globally unique– E.g. {4A79114D-19E4-11d3-B86B-00C04F79F802}
• Program Identifier (ProgID)– Human friendly reference for GUID– Examples
> Cogent.OPCDataHub.1> KEPware.KEPServerEx.v4
• Information is stored in Windows Registry
01 -
Roa
d M
ap25
GeoBalance
.NET
• .NET
01 -
Roa
d M
ap26
GeoBalance
Functional Description
01 -
Roa
d M
ap27
GeoBalance
Client / Server Architecture
• OPC Client– Consumes data (OPC Consumer)– Makes requests– In “charge”
• OPC Client Applications– HMI– Sentry
01 -
Roa
d M
ap28
GeoBalance
Client / Server Architecture
• OPC Server– Provides data (OPC Producer)– Provides responses– In “service”
• OPC Server Applications– PLC– INSITE
01 -
Roa
d M
ap29
GeoBalance
Client / Server Architecture
• OPC Client and Server Communicate• OPC Client makes requests• OPC Server responds• Multiple Responses• Client/Server conversation
01 -
Roa
d M
ap30
GeoBalance
Client / Server Architecture
• 1 Client can communicate with many Servers• 1 Server can communicate with many Clients• Limitations
– Computer resources– Licencing
• Common Pitfalls:– Vendor Limits number of Client/Server connections
01 -
Roa
d M
ap31
GeoBalance
The Logical Object Model
OPCServer
OPCGroup
OPC/COMInterfaces
OPCGroupOPCGroup(s)
OPCItem(s)OPCItem(s)OPCItem(s)OPCItem(s)OPCItem(s)OPCItem(s)
OPCItem(s)OPCItem(s)OPCItem(s)
01 -
Roa
d M
ap32
GeoBalance
General OPC Data Layout
This is a screen using a tool called OPC Data Spy
Computer Level
OPC Flavor Level
OPC Server Level
OPC Items Tree
OPC Item
01 -
Roa
d M
ap33
GeoBalance
OPC DA• OPC Data Access (DA)
– Enables applications to exchange real-time data• Data Items have
– Value– Quality– Timestamp
• Key functions– Read / Write data– Subscribe/Unsubscribe to data– Browse for available servers and data
• Real-time values only
01 -
Roa
d M
ap34
GeoBalance
Adding Groups
• All items in a Group share the same update rate• Groups
– Private / Local– Accessible to only one client
• Update rate– Set in milliseconds– If server cant support the specified rate, it can return
a rate that it can support– Passing 0 indicates the Server should use the fastest
practical update rate
01 -
Roa
d M
ap35
GeoBalance
OPC DA: Sync and Async• Synchronous (Sync)
– Must wait for confirmation– Important for “Order of Operations”
• Asynchronous– Can send multiple requests– Improves performance when possible
• Insight– Speed / resource issues– What circumstances for each method?
• Common pitfalls– Only Sync R/W
01 -
Roa
d M
ap36
GeoBalance
OPC DA: Reading Data
• Reading– Polling– Subscription (report by exception)– Cache read– Device read
• Insight– Speed / resources issue– What circumstances for each method
• Common Pitfalls– Using only device reads– Polling instead of subscription
01 -
Roa
d M
ap37
GeoBalance
OPC DA: Reading Data
• 6 ways Client can read data– Sync Read (cache or device)– Async Read (device)– On Data change (cache or device)– Item Read (cache or device)– Sync Read Max Age (cache or device)– Async Read Max Age (cache or device)
• Async refresh triggers exception• Subscription uses many callbacks
01 -
Roa
d M
ap38
GeoBalance
OPC DA: Writing Data
• OPC Clients can write to Servers• Server can prioritize for writes• Client can write
– Value– Quality– Timestamp
• Typically, clients only write value– Example?
01 -
Roa
d M
ap39
GeoBalance
OPC DA: Writing Data
• Sync Write• Async Write• Item WriteVQT• Sync WriteVQT• Async WriteVQT
01 -
Roa
d M
ap40
GeoBalance
OPC DA: Timestamps
• Items includes timestamp information (UTC)• Timestamp can come from
– Device (if it is available)– OPC Server
• Insight– When is accuracy important– Is synchronization needed?
• Common Pitfalls– OPC Server ignores device timestamp– Device clock is inaccurate
01 -
Roa
d M
ap41
GeoBalance
OPC DA: Quality• Items includes Quality information• Example Qualities:
– Good, non specific– Bad, last known value– Bad, communication failure
• Quality can come from– Device (if it is available)– OPC Server
• Insight: What if there is a read error• Common Pitfalls
– OPC Server ignores quality– OPC Client has trouble with bad quality
01 -
Roa
d M
ap42
GeoBalance
OPC DA: Performance
• Can pass thousands for points per second• OPC is rarely the bottleneck
– Serial (300 items/s)– Noisy (radio or satellite)– Slow device– Inefficient API– Computer hardware
• Insight:– Polling instead of subscription– Device instead of Cache reads– Non optomised OPC server
01 -
Roa
d M
ap43
GeoBalance
Hands-on Exercise: IC Excel
01 -
Roa
d M
ap44
GeoBalance
OPC & Your Workflow
• Install software– OPC Common Definitions
• Start Client• Browse for OPC Servers
– OPCEnum• Client connects to Server
– OPC Data Access• Read/Write Data
– OPC Data Access
01 -
Roa
d M
ap45
GeoBalance
OPC General Connection
Connect to the OPC Server
Add Group(s)
Add Item(s) to Group(s)
Activate Groups & Items
Data Change Events Fire
De-Activate Groups & Items
Remove Item(s) from Group(s)
Remove Group(s)
Disconnect from the OPC Server
User Program Handles Data - Log, Display, Graph, etc
01 -
Roa
d M
ap46
GeoBalance
PSL-OPC: Overview• Server
– Softing OPC Server– NI FieldPoint OPC Server– INSITE OPC Server
• Client– KEPware OPC Quick Client– NI Server Explorer– Softing Demo Client– Sentry– Sintef
• Core– DCOM– OPCEnum
01 -
Roa
d M
ap47
GeoBalance
PSL-OPC: OverviewP
TF
D... ...
Sensors
PT
FD
... ...
Sensors
INSITE Applications
KEPware OPC Quick
Client
NI Server Explorer
Softing Demo Client
Softi
ng O
PC
Serv
er
NI F
ield
Poin
t O
PC S
ever
INSI
TE O
PC
Serv
erSentry
Sie
men
s P
LC
NI D
atal
ogge
r
INS
ITE
OPCEnum
DCOM
Client pack
Server pack
Post packCore pack
Saad Saeed | 31-Mar-2008 | rev 0
01 -
Roa
d M
ap48
GeoBalance
Softing OPC Server• Purpose
– The purpose of the Softing OPC Server is to communicate with the Siemens S7 PLC (device) and make the real-time PLC readings, control and computed values available via OPC.
• Details At A Glance:– Name: Softing OPC Server– PSL-OPC Pack: Server– Version: 3.12– OPC DA server name: Softing S7/S5 OPC Server– OPC DA server CLSID: {6F17505C-4351-46AC-BC1E-
CDE34BB53FAA}– OPC DA server ProgId: Softing.OPC.S7.DA
01 -
Roa
d M
ap49
GeoBalance
Softing OPC Server
PT
FD
... ...
Monitoring (Sensors)
Saad Saeed | 31-Mar-2008 | rev 0
... ...
Control (Chokes, Valves)
Siemens Simatic S7 program
Siemens S7-xxx PLC
Softing OPC Server
Device driverOPC server
Field monitoring and control components (sensors, valves, etc)Key:
OB/FB/FCDB/Config
DC
OMOPC DA
OPC XML-DA
Web
Ser
vice
Signal Ethernet Software/API call 4-20 mA or Digital Proprietary protocol OPC
CLSID={6F17505C-4351-46AC-BC1E-CDE34BB53FAA}
Sie
men
s P
LC
01 -
Roa
d M
ap50
GeoBalance
NI FieldPoint OPC Server• Purpose
– The purpose of the NI FieldPoint OPC Server is to communicate with the NI Compact FieldPoint datalogger (device) and make the real-time signals, readings and computed values available via OPC.
• Details At A Glance:– Name: NI FieldPoint OPC Server– PSL-OPC Pack: Server– Version: 4.1.0.3001– OPC DA server name: FieldPointOPC2– OPC DA server CLSID: {D72CD703-BD32-11D3-9D41-
0000C0337A95}– OPC DA server ProgId: National Instruments.OPCFieldPoint
01 -
Roa
d M
ap51
GeoBalance
NI FieldPoint OPC Server
PT
FD
... ...
Monitoring (Sensors)
Saad Saeed | 31-Mar-2008 | rev 0
NI cFP-21xx
NI FieldPoint OPC Server
Device driverOPC server
Field monitoring components (sensors, etc)Key:
DC
OMOPC DA
Signal Ethernet Software/API call 4-20 mA or Digital Proprietary protocol OPC
CLSID={D72CD703-BD32-11D3-9D41-0000C0337A95}
NI D
atal
ogge
r
NI FieldPoint Server (FP Server)
NI IAK file
01 -
Roa
d M
ap52
GeoBalance
INSITE OPC Server• Purpose
– The purpose of the INSITE OPC Server is to communicate with INSITE (device) and make INSITE real-time broadcast data available via OPC.
• Details At A Glance:– Name: INSITE OPC Server– PSL-OPC Pack: Server– Version: 29-Aug-2007– OPC DA server name: Halliburton.InsiteOPC OPC DA Server– OPC DA server CLSID: {C64AC028-41B1-4B01-AD45-
3CB7CDA4725E}– OPC DA server ProgId: Halliburton.InsiteOPC.1– If the OPC server is installed as an NT service, the following
names are used:> NT service name: Halliburton.InsiteOPC> NT service description: Halliburton.InsiteOPC OPC DA Server
01 -
Roa
d M
ap53
GeoBalance
Installation
01 -
Roa
d M
ap54
GeoBalance
Installation
1. Server1. Softing OPC Server (Licensing)2. NI FieldPoint OPC Server3. INSITE OPC Server
2. Client1. KEPware OPC Quick Client2. NI Server Explorer3. Softing Demo Client4. Sentry (later)
3. Core1. DCOM2. OpcEnum
01 -
Roa
d M
ap55
GeoBalance
Key
• key= 0160-0000-0000-2e5d
01 -
Roa
d M
ap56
GeoBalance
Operation
01 -
Roa
d M
ap57
GeoBalance
Operation
1. Server1. Softing OPC Server 2. NI FieldPoint OPC Server3. INSITE OPC Server
2. Client1. KEPware OPC Quick Client2. NI Server Explorer3. Softing Demo Client4. Sentry (later)
3. Core1. DCOM2. OpcEnum
01 -
Roa
d M
ap58
GeoBalance
XML-DA Simulation
• http://192.168.0.50/Simulator-XML-DA/KEPware.KEPServerEx.V4.asmx
01 -
Roa
d M
ap59
GeoBalance
The End
• The End of this presentation