Sie sind auf Seite 1von 40

OPC: Environment for Industrial System Integration

Click to edit Master title style Author


Truong Dinh Chau, Ph.D Ho Chi Minh City Univ. of Tech. chau.truong@hcmut.edu.vn chau.truong@me.com (+84) (0)91. 543-74-40

Click to edit Master title style Topics


Approaches for connection with control devices: Direct driver, DDE, OPC I/O driver problem. What is OPC Logical object model OPC Data Access Server OPC client/server interaction Data sources Modes of data exchange between OPC client/server Structure of demo system Popular SCADA (Citect (Citect, Citect, Intouch, Intouch, RSView32) OPC C++ application OPC .NET OPC Web OPC MS Excel OPC

Approaches for connection with control devices

Click to edit Master title style Technologies


DLL - Dynamic-link Library (Direct drivers) DDE - Dynamic Data Exchange OPC - OLE for Process Control

Click todrivers edit Master title style Direct


User C/C++ code

Driver A - DLL

I/O Device A

General part (EXE)

Driver B - DLL

I/O Device B

Driver C - DLL
Specific part

I/O Device C

SCADA

Click todrivers edit Master title style Direct

Click todrivers edit Master title style Direct


EXE
Tag Tag DAQ Tasks Tag Tag

DLL
Tag
bool DeviceConfig DeviceConfig() () { ... } float Read Read( ( DWORD Channel) { ... }

Tag Tag Tag

Tag

bool Write Write( ( DWORD Channel, float Data) { ... Tag }

DAQ Tasks

Click DDE to edit Master title style


DDE Clients, SCADA
DDE Sever DDE Server I/O Device

I/O Device

DDE Server

I/O Device

Computer A

Click DDE to edit Master title style

Application|Topic1!Item2

Application Topic1 Item1 Item2 Item3 Topic2 Item1 Item2 Item3 DDE Server I/O Device

DDE Client

Click tofor edit Master title style Demo DDE connection


Excel Citect Excel Intouch Intouch - Citect

OPC

Click to edit Master title style The I/O driver problem


C/C++ Application SCADA SCADA

Software Driver A
Physical I/O

Software Driver B
Physical I/O

Software Driver C
Physical I/O

Device A

Device B
Allow

Device C
Not allow

Click editOPC Master title the style How to does solve problem?
C/C++ Application
OPC

SCADA
OPC

SCADA
OPC

OPC

OPC

OPC

Software Driver A
Physical I/O

Software Driver B
Physical I/O

Software Driver C
Physical I/O

Device A

Device B

Device C

Click to edit Master title style The I/O driver problem

Click editOPC Master title the style How to does solve problem?

What is OPC? Click to edit Master title style OPC Foundation (www.opcfoundation.org). OPC is an industry standard created
by a number of worldwide leading hardware and software suppliers. The OPC standard specifies an interface between client applications and servers of process data. The standard was purposely limited to the reading and writing of real-time process values (Data Access DA). Alarm handling, process events (A&E), historical data access (HDA), were all deferred to subsequent releases of the standard. An OPC compliant client can read and write data to any OPC compliant server. OPC is supported 408 companies: Schneider Electric (France), Iconics (USA), Wonderware (USA), Rockwell Automation (USA), Adastra (Russia), Siemens (Germany), Intellution (USA), Indusoft Russia (Russia), Fastwel (Russia), ABB Automation (USA), Fieldbus Foundation (USA), Toshiba (Japan), Hitachi (Japan), National Instruments (USA), Advantech (Taiwan)
SCADA Vijeo Citect InTouch RSView32 iFIX WinCC Genesis32 Cimplicity GenieDAQ Trace Mode Vijeo Look LabView Master SCADA Contour Wizcon Crug-2000 Elipse SCADA Company Schneider Electric Wonderware Rockwell Automation Intellution Siemens Iconics GE Fanuc Advantech AdAstra Schneider Electric National Instruments InSAT Obedinenie Uig Axeda Crug Elipse Software Country France USA USA USA Germany USA USA Taiwan Russia France USA Russia Ucraina USA Russia USA

OPC Server

Software driver

Click Master title style Whatto isedit OPC?


Object Linking & Embedding

OPC OLE for Process Control OPC OLE for Production Control OPC Openness, Productivity and Connectivity OPC OLE COM for Process Control
COM Component Object Model provides interfaces and inter-component communication. Through COM, an application may use features of any other application object. COM is the core of DCOM (Distributed COM), ActiveX.

Click edit Master title style OPC to components


OPC Server (DLL) OPC Client (SCADA) OPC Server (EXE) OPC Server (EXE) I/O Device

I/O Device

I/O Device

Click to object edit Master style Logical model title OPC Server
OPC Interfaces

OPC Server
OPC Group OPC Group OPC Group

OPC Interfaces

OPC Group OPC Group OPC Item

OPC Group OPC Group OPC Item OPC Group OPC Group OPC Item

Device Tag Tag Tag

Device Tag Tag Tag

Click edit Master title style OPC to Item


Connection to a data source. Properties: Data value (v) VARIANT type: boolean, integer, float, string, Quality (q) UNCERTAIN, GOOD, BAD, Time stamp (t) - FILETIME: {yyyy:mm:dd:hh:mm:ss:} - The Timestamp should indicate the time that the value and quality was obtained by the device.

Item i

Tag j

Timestamp of real-time data in the integrated control Click system to edit Master title style
Supervision
SCADA station SCADA station

v1, q1, t
OPC Server

1.7, GOOD, 3.1, GOOD, 3.8, 3.2, 0.9, 2.6, 4.5, 4.2, 3.9, 4.0, 4.3, 4.6, 4.4, 4.1, 3.5, 2.9, 2.7, 2.0, 2.1, 1.9, 1.8, 1.7, 1.6, BAD, 03:54:06 03:54:07 03:54:10 03:54:12 03:54:13 03:54:16 03:54:20 03:54:21 03:54:23 03:54:24 03:54:26 03:54:27 03:54:31 03:54:32 03:54:33 03:54:01 03:54:02 03:54:03 03:54:04 03:54:05 03:54:08 03:54:09 03:54:11 03:54:14 03:54:15 03:54:17 03:54:18 03:54:19 03:54:22 03:54:25 03:54:28 03:54:29 03:54:30 03:54:35 03:54:36 03:54:38 03:54:39 03:54:40 03:54:41 03:54:42 03:54:43 03:54:44 03:54:45 03:54:46 03:54:47 03:54:48 03:54:49 03:54:50 03:54:51 03:54:52 03:54:53 03:54:54 03:54:55 03:54:56 03:54:57 03:54:58 03:54:59 v4, 03:54:34 q 4, t 03:54:60
OPC Server

v5, q5, t

v6, q6, t
OPC Server

v1, q1, t

1.7, GOOD, 3.1, 3.8, 3.2, 2.6, 4.5, 5.1, 4.2, 3.9, 4.0, 4.3, 4.6, 4.4, 4.1, 3.5, 2.9, 2.7, 2.0, 2.1, 1.9, 1.8, 1.7, 1.6, OK, BAD, GOOD, BAD, v , q ,t 03:54:01 03:54:02 03:54:03 03:54:04 03:54:05 03:54:06 03:54:07 03:54:08 03:54:09 03:54:10 03:54:11 03:54:12 03:54:13 03:54:14 03:54:15 03:54:16 03:54:17 03:54:18 03:54:19 03:54:20 03:54:21 03:54:22 03:54:23 03:54:24 03:54:25 03:54:26 03:54:27 03:54:28 03:54:29 03:54:30 03:54:31 03:54:32 03:54:33 03:54:34 03:54:35 03:54:36 03:54:38 03:54:39 03:54:40 03:54:41 03:54:42 03:54:43 03:54:44 03:54:45 03:54:46 03:54:47 03:54:48 03:54:49 03:54:50 03:54:51 03:54:52 03:54:53 03:54:54 03:54:55 03:54:56 03:54:57 03:54:58 03:54:59 4 4 03:54:60
PLC

v3, q3, t

v5, q5, t

v6, q6, t

Upper controller level

Controller level
Instrumentation Passive I/O boards

PLC

v1, t

v2, t

v3, t

1.7, v03:54:59 4, t 3.1, 3.8, 3.2, 0.9, 2.6, 4.5, 5.1, 4.2, 3.9, 4.0, 4.3, 4.6, 4.4, 4.1, 3.5, 2.9, 2.7, 2.0, 2.1, 1.9, 1.8, 1.7, 1.6, 03:54:01 03:54:02 03:54:03 03:54:04 03:54:05 03:54:06 03:54:07 03:54:08 03:54:09 03:54:10 03:54:11 03:54:12 03:54:13 03:54:14 03:54:15 03:54:16 03:54:17 03:54:18 03:54:19 03:54:20 03:54:21 03:54:22 03:54:23 03:54:24 03:54:25 03:54:26 03:54:27 03:54:28 03:54:29 03:54:30 03:54:31 03:54:32 03:54:33 03:54:34 03:54:35 03:54:36 03:54:38 03:54:39 03:54:40 03:54:41 03:54:42 03:54:43 03:54:44 03:54:45 03:54:46 03:54:47 03:54:48 03:54:49 03:54:50 03:54:51 03:54:52 03:54:53 03:54:54 03:54:55 03:54:56 03:54:57 03:54:58 03:54:60

v5, t

v6, t

v value, q quality, t timestamp

Click edit Master OPC to Group Objecttitle style


Collection of items. Group i Clients must use group to access items. Properties: Item 1 Requested update rate; Item 2 Percent dead-band; Time bias;

Item 3

Click edit Master title style OPC to DA Specification ver. 1.0

Click edit Master titleServers style Data to sources in OPC


Read from servers internal cache. Read directly from device. Write directly to the device.

Client/server interaction

Click to 1 edit Master title style Client 2 Client


Server 1 Group Group 12
Item 1 Server 2 Group 2 Group 1 Item 1 Item 2 Item 1

Item 1

Item 2
Item 3
OPC Server

Device 1 Tag 1 Tag 2 Tag 3

Device 2 Tag 1 Tag 2

Modes of data exchange between OPC Click to edit Master title style Server/Client Synchronous read/write. Asynchronous read/write. Subscription (for read). Refresh (for read).

Synchronous mode
Client title 1 Click to edit Master style Server 1 Group 2 Group 1
Group1.Read(DEVICE, ItemHandles, Results)

OPC Server

Item 1 Item 2 Item 3

Item 1

Device 1 Tag 1 Tag 2 Tag 3

Device 2 Tag 1 Tag 2

Asynchronous mode
Client title 1 Click to edit Master style
Group1.Read(DEVICE, ItemHandles)

Server 1 Group 2 Group 1


OPC Server

Client1.ReadComplete(Results)

Item 1 Item 2 Item 3

Item 1

Device 1 Tag 1 Tag 2 Tag 3

Device 2 Tag 1 Tag 2

Subscription
Client title 1 Click to edit Master style Server 1 Group 2 Group 1
OPC Server
Client1.DataChanged(Data)

Item 1 Item 1 Item 2 Item 2 Item 3 Item 3

Item 1
Data changed Data changed

Device 1 Tag 1 Tag 2 Tag 3

Device 2 Tag 1 Tag 2

Demo system Click to edit Master title style

Click tosystem edit Master title style Demo

Click to PLC edit Master title style Demo:

Demo: OPC Server Click to SCADAs edit Master title style


Citect, Schneider Electric Intouch, Wonderware RSView32, Rockwell Automation

Click to C++ edit Master title style Demo: Application OPC Server

Click to Excel edit Master titleClient style Demo: as OPC

Click to edit Master title OPC.NET style Demo: .NET OPC client. wrapper
.NET platform interface

C# thread C++ object COM interface

Click to edit Master Demo: C# OPC clienttitle style

Click to edit Master titleClient style Demo: Web-based OPC

Click to edit Master title style

Thank you for your attention