Introduction To OPC With Examples Video - Halvorsen.blog

1y ago
13 Views
2 Downloads
3.95 MB
45 Pages
Last View : 21d ago
Last Download : 3m ago
Upload by : Baylee Stein
Transcription

Introduction to OPCwith ExamplesHans-Petter Halvorsen, M.Sc.

Contents Short Introduction to OPC– Classic OPC vs. Next Generation OPC OPC Server: Matrikon OPC Simulation Server OPC DA Examples– LabVIEW, Visual Studio, MATLAB OPC UA Examples– LabVIEW

OPCHans-Petter Halvorsen, M.Sc.

What is OPC? A standard that defines the communication of databetween devices from different manufactures Requires an OPC server that communicates with the OPCclients OPC allows “plug-and-play”, gives benefits as reducesinstallation time and the opportunity to choose productsfrom different manufactures Different standards: “Real-time” data (OPC DA), Historicaldata (OPC HDA), Alarm & Event data (OPC AE), etc.

OPCOPC ServerOPC ClientRead/Write DataData Storage

OPC ServerWrite DataOPC ClientData StorageRead DataOPC ClientMonitoring and AnalysisMeasurement Data

Data AcquisitionPLC, PAC, DCS, SCADAProcess DataOPC-ServerTypical -ClientOPC-ClientOPC-Client

OPC Specifications“Next Generation” OPC“Classic” OPCOPC DAOPC UAOPC HDAOPC A&E. (Many others)

OPC Specifications OPC DA (Data Access)The most common OPC specification is OPC DA, which is used to read and write “real-time”data. When vendors refer to OPC generically, they typically mean OPC DA. OPC HDA (Historical Data Access) OPC A & E (Alarms & Events) . (many others)These OPC specification are based on the OLE, COM, and DCOM technologies developed byMicrosoft for the Microsoft Windows operating system family. This makes it complicated tomake it work in a modern Network! Typically you need a Tunneller Software in order to sharethe OPC data in a network (between OPC Servers and Clients) OPC UA (Unified Architecture)OPC UA eliminating the need to use a Microsoft Windows based platform of earlier OPCversions. OPC UA combines the functionality of the existing OPC interfaces with newtechnologies such as XML and Web Services (HTTP, SOAP)

Next Generation OPCCOM/DCOMOPC ClassicXML, HTTP, SOAPNext Generation OPCOPC DAWindows onlyOPC HDAOPC A&EOPC DA ServerOPC HDA ServerOPC A&E ServerOPC UAAll specificationscollected in one (DA,HDA, A&E)Protocols: “UA Binary” or “UA XML”Cross-platformWindows, Linux, Mac,Embedded, VxWorksSimpler!!OPC Client(DCOM)OPC UA Server(everything built into one)OPC UA Client

Next Generation OPCOPC Classic ServerNetworkOPC Classic ClientTo open DCOM through firewalls demanded a large hole in the firewall!Impossible to route over Internet!OPC UA ServerNetwork/InternetOPC UA ClientNo hole in firewall (UA XML) or just a simple needlestick (UA Binary) is necessaryEasy to route over Internet!

Classic OPC vs. OPC UAClassic OPC (DCOM)WindowsOPC ClientWindowsWindowsOPC ServerOPC ClientWindowsOPC UAThe server (or clients) canbe an embedded system,LINUX, Windows, etc.OPC UA ServerOPC UA ClientOPC UA ClientOPC UA ClientOPC ClientClassic OPC requires a Microsoft Windows operating system to implement COM/DCOM server functionality. By utilizing SOA and Web Services,OPC UA is a platform-independent system that eliminates the previous dependency on a Windows operating system. By utilizing SOAP/XML overHTTP, OPC UA can deploy on a variety of embedded systems regardless of whether the system is a general purpose operating system, such asWindows, or a deterministic real-time operating system.http://www.ni.com/white-paper/13843/en/

Matrikon OPCSimulation ServerHans-Petter Halvorsen, M.Sc.

Matrikon OPC Explorer – Connect to Server12

Matrikon OPC Explorer - Add Tags43152FinishedDouble-click

MatrikonOPC Explorer (OPC Client)The MatrikonOPC Explorer is useful for testing. You can use it for writing and reading OPC Tags

Practical ExamplesHans-Petter Halvorsen, M.Sc.

Programming Examples You can create OPC Clients (and OPC Servers) inmost Programming Languages You can create it totally from Scratch using theOPC specifications Or you can create them using existing Librariesand APIs– We will show some examples created in LabVIEW,Visual Studio and MATLAB

The OPC Functions in LabVIEWYou can use LabVIEW as an OPC client by connecting to an OPC serverthrough a DataSocket connection.The DataSocket palette in LabVIEW:Write Data to OPCRead Data from OPCOpen Connectionto OPC ServerBrowse OPC Serversand OPC ItemsClose Connectionto OPC Server

MATLAB OPC Toolbox OPC Toolbox provides access to live and historicalOPC data directly from MATLAB and Simulink You can read, write, and log OPC data fromdevices, such as distributed control systems(DCS), supervisory control and data acquisitionsystems (SCADA), and programmable logiccontrollers (PLS)

Measurement Studio Add-on package to Visual Studio created byNational Instruments Same vendor as LabVIEW Makes it possible to communicate with anOPC DA Server from Visual Studio Code Uses the DataSocket Library (same as inLabVIEW)

OPC Read ExamplesHans-Petter Halvorsen, M.Sc.

Read from OPC Server using LabVIEWWhile Loop12Or specify URL directly:3While Loop4

Read OPC - Visual Studio ExampleMatrikon OPC Server/OPC ExplorerVisual Studio AppClick Button to get latest Valuefrom OPC Server

OPC Write ExamplesHans-Petter Halvorsen, M.Sc.

Write to OPC Server using LabVIEWWhile Loop12Or specify URL directly:Use the BucketBrigade Items – because theycan be used for both reading and writing3While Loop4

Write OPC – Visual Studio ExampleMatrikon OPC Server/OPC ExplorerVisual Studio App

OPC Write/Read ExampleHans-Petter Halvorsen, M.Sc.

Write/Read Example

Example: Trending Datafrom OPCHans-Petter Halvorsen, M.Sc.

Visual Studio Example

MATLABExampleThis simple Example uses some ofthe more advanced features inthe MATLAB OPC Toolbox.No For/While Loop needed!clear, clc% Connect to OPC Serverda opcda('localhost', 'Matrikon.OPC.Simulation.1');connect(da);% Create Groupgrp addgroup(da, 'DemoGroup');%Add TagsitmIDs {'Random.Real8'};itm additem(grp, itmIDs)% Set PropertieslogDuration 60;logRate 0.2;numRecords ceil(logDuration./logRate)grp.UpdateRate logRate;grp.RecordsToAcquire numRecords;% Acquire Datastart(grp), wait(grp)% Retrieve Data[logIDs, logVal, logQual, logTime, logEvtTime] getdata(grp, 'double');% Plot Dataplot(logTime, logVal);axis tightdatetick('x', 'keeplimits')legend(logIDs)%Clean Updisconnect(da)delete(da)

OPC UA ExampleUA – Unified ArchitectureHans-Petter Halvorsen, M.Sc.

OPC UA UA – Unified Architecture The Next Generation OPC Based on Modern Software/NetworkArchitecture (No DCOM problems!)

OPC UA in 618J-01/TOC9.htmDSC – Datalogging and Supervisory ControlNote! You need to installthe “LabVIEW DSC Module”or the “LabVIEW Real-TimeModule”

OPC UA ServerRead Data from OPC UA ServerWrite Data to OPC UA ServerLabVIEW Application #1OPC UA ClientLabVIEW Application #2In this Example LabVIEW Application #1,#2 and #3 are on the same computer.Normally they are located on differentcomputers or devices in a Network.OPC UA ClientLabVIEW Application #3

OPC UA ServerOPC UA Client

Summary This Video has given you an Overview ofOPC Some Examples has been shown– Matrikon OPC Simulation Server– LabVIEW, Visual Studio, MATLAB Examples– I go through these Examples in detail in a setof Videos

Hans-Petter Halvorsen, M.Sc.University College of Southeast Norwaywww.usn.noE-mail: hans.p.halvorsen@hit.noBlog: http://home.hit.no/ hansha/

OPC UA Server OPC UA Client OPC UA Client Classic OPC requires a Microsoft Windows operating system to implement COM/DCOM server functionality. By utilizing SOA and We b Services, OPC UA is a platform-independent system that eliminates the previous dependency on a Windows operating system. By utilizing SOAP/XML over

Related Documents:

D. OPC UA using LabVIEW (OPC UA Server OPC UA Clients) E. OPC with Visual Studio, MATLAB or Python. Select one of the following I. Trend OPC DA Data using Visual Studio Measurement Studio II. Get Temperature Data into MATLAB using MATLAB OPC Toolbox III. Get Temperature Data into Python F. OPC Network: Send OPC data between different .

2.2 OPC Scout V10 2.2.1 OPC client for test purposes SIMATIC Net OPC Scout V10 OPC Scout V10 is a standard OPC client that is supplied with SIMATIC NET. OPC Scout V10 can be used as a test tool when commissioning and checking an OPC system. Note For more information about

OMRON Guide to Using CX-Server OPC in Microsoft .Net Page 4 About this Manual This manual describes the CX-Server OPC client application and its ability to interface with OPC servers. It does not provide detailed information concerning OPC itself, or the CX-Server OPC server.The main CX-Server OPC user

The DeltaV OPC Data Access Server provides real-time, read/ write data communications to OPC client applications. For OPC data communications where you can’t afford interruptions, the DeltaV system offers OPC server redundancy to minimize the risk of interruptions. You can add a standby OPC ser

The OPC Quick Client allows you to perform operations on an OPC server at the Server, Group and Item level. This allows a user to test out the functionality of an OPC server prior to configuring the HMI programs2 that will ultimately interface with the OPC server. The OPC Quick Client also allows the user to

(OPC .Xi), is a client-server architecture based on the latest . wrap existing OPC clients and servers to provide a quick and easy migration path from OPC Classic to OPC .NET. Based on open, industry standards: OPC .NET is ba

This section explains the main features of the Cyberlogic OPC Server as they relate to the Data Logger feature. Refer to the Cyberlogic OPC Server Help for a full discussion of the common features of the Cyberlogic OPC Server. If you are new to OPC or the Cyberlogic OPC Server, we strongly recommend that you read the OPC Tutorial first.

P 4 418.668 P 4 419.989 P 5 418.186 P 5 419.227 P 6 418.973 P 6 419.684 P 7 419.379 P 7 420.751 P 8 420.141 P 8 420.065 P 9 419.532 P 9 421.259 P 10 418.643 P 10 421.386 P 11 418.719 P 11 418.846 P 12 416.763 P 12 419.887 P 13 414.782 P 13 418.363 P 14 P 14 P 15 P 15 P 16 P 16 P 17 P 17 P 18 P 18 P 19 P 19 Test Sample j 2 Test Sample j 3 Reading Points Reading Points Reading Points Test Sample .