1 / 47

OLE for Process Control (OPC)

OLE for Process Control (OPC). By Dr. Diew Koolpiruck. INC 448 Advanced Process Control, 2005. OPC Overview. OPC Common OPC Data Access OPC Alarms and Events Specification OPC Historical Data Specification Applications. INC 448 Advanced Process Control, 2005. Executive Summary.

hedwig
Télécharger la présentation

OLE for Process Control (OPC)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OLE for Process Control (OPC) By Dr. Diew Koolpiruck INC 448 Advanced Process Control, 2005

  2. OPC Overview • OPC Common • OPC Data Access • OPC Alarms and Events Specification • OPC Historical Data Specification • Applications INC 448 Advanced Process Control, 2005

  3. Executive Summary OPC is a set of standard commands collected in a software library (DLL) that can be called by client applications, written in Visual Basic, C# or other Microsoft programming languages, that allow to access automation devices (PLCs) in a uniform way, independently from their built or manufacturer. To that effect, the particularities of the automation devices are hidden by an OPC server running either on the same machine as the client program or on another machine, by using DCOM. The OPC Servers are supplied by the manufacturer of the PLC or by 3rd parties and can manage several PLCs of the same type. Several servers can run in parallel. The OPC library allows in particular to read and write process variables, read alarms and events and acknowledge alarms, and retrieve historical data from data bases according to several criteria. Automation platforms such as ABB's 800XA platform act as OPC clients to collect data from PLCs or databases through third-party OPC servers. Several automation platforms act themselves as an OPC server to publish their data, events and historical data. OPC is the preferred connectivity for 78% of MES, 75% of HMI / SCADA, 68% of DCS / PLC and 53% or ERP /Enterprise system level applications (according to Arc Advisory Group, 2004)" INC 448 Advanced Process Control, 2005

  4. Where is OPC in a system? Technologies Configuration DB, Archives, Logfiles, etc. Storage Supervision SCADA WAN LAN Process Management . . . OPC LAN Communication Protocols Controller/ PLC Other systems (LHC, Safety, ...) VME PLC FieldBus Field Management Field buses Experimental equipment Sensors/devices SCADA = supervisory control and data acquisition OPC = OLE for process control PLC = Programmable logic controller Field buses = CAN, ProfiBus, WorldFip, ... INC 448 Advanced Process Control, 2005

  5. What is OPC ? OPC (formerly: "OLE1 for Process Control", now: "Open Process Control") is an industry standard set up by the OPC Foundationspecifying the software interface (objects, methods) to a server that collects data produced by field devices and programmable logic controllers. interfacescovered by the OPC standard node application (OPC client) servers OPC serverX OPC server (simulator) OPC server Y Ethernet (not covered) Field bus(not covered) PLCs Brand Y PLCs Brand X Sensors/Actors 1) OLE (Object Linking and Embedding) is a Microsoft technology for connecting software components. It has since been extended by the COM / DCOM technology. It corresponds to Java Beans. INC 448 Advanced Process Control, 2005

  6. Before OPC visualization history data base Profinet driver MasterBus MMS driver XWAY driver ABB PLCs Télémécanique PLCs Siemens PLCs INC 448 Advanced Process Control, 2005

  7. With OPC: ABB Operator Workplace Connection OperatorIT Historian (Information Manager) application software is written independently from the type of controller the drivers still exist, but the clients do not see them anymore AC800MOPC server SiemensOPC server SchneiderOPC server ProfiNet MMS XWAY ABB AC800M Télémécanique TSX Siemens S7 INC 448 Advanced Process Control, 2005

  8. The main OPC Specifications OPCBatch OPCHDA history data base batch system OPC Data Access OPCAlarms & Events OPCDX OPCUA INC 448 Advanced Process Control, 2005

  9. Specification 1: OPC DA for Data Access Process variables describe the plant's state, they are generated by the sensors or calculated in the programmable logic controllers (PLCs). Process variables can be sent upon a change, on demand or when a given time elapsed. The OPC DA (Data Access) specification addresses collecting Process Variables.The main clients of OPC DA are visualization and (soft-) control. INC 448 Advanced Process Control, 2005

  10. Specification 2: OPC AE for Alarms and Events Events are changes in the process that need to be logged, such as "production start" Alarms are abnormal states in the process that require attention, such as "low oil pressure" OPC AE (Alarms and Events) specifies how alarms and events are subscribed, under which conditions they are filtered and sent with their associated messages.The main clients of OPC AE are the Alarms and Event loggers. determine the exact time of change (time stamping) categorize by priorities log for further use acknowledge alarms(events are not acknowledged) link to clear text explanation INC 448 Advanced Process Control, 2005

  11. Specification 3: HDA for Historical Data Access Historical Data are process states and events such as: process variables, operator actions, recorded alarms,... that are stored as logs in a long-term storage for later analysis. OPC HDA (Historical Data Access) specifies how historical data are retrieved from the logs in the long-term storage, filtered and aggregated (e.g. compute averages, peaks). INC 448 Advanced Process Control, 2005

  12. Specification 4:OPC Batch • based on: • IEC 61512-1 Batch Control – Part 1: Models and Terminology • (ANSI/ISA S88.01 1995) • ISA-dS88.02-2000 draft 17 of May 2000 • allows to access: • equipment capabilities, • current operating conditions, • historical and • recipe contents INC 448 Advanced Process Control, 2005

  13. Beyond Microsoft: OPC UA In a move to get more independence from Microsoft and use web technology, a new specification called " Unified Architecture" (formerly. OPC XML) that uses web services for all kinds of transactions: query, read, write, subscribe,... The classical OPC DA, AE and HDA are implemented with XML / SOAP /WSDL this allows encryption and authentication of process data. This does not only standardize the interfaces, but also the transmitted data. INC 448 Advanced Process Control, 2005

  14. OPC as a hub OPC variables is also a convenient way to exchange data between applications on the same machine. OPC data can be easily read in any Microsoft Office application source: Siemens WinCC INC 448 Advanced Process Control, 2005

  15. OPC connection to databases Tools such as LifeWire’s allow to build an OPC DA interface to any ODBC - equipped database. The database internal structure (exposed through queries) is reflected as a hierarchy of OPC items. This allows to give a unified access to simple items. application (OPC client) OPC server ODBC DB INC 448 Advanced Process Control, 2005

  16. Server(s) and Client(s) in the same node node client application (OPC client) client application (OPC client) OPC server OPC server OPC server devices devices devices devices Clients and servers run as parallel processes The OPC specification defines the interface between client and server in the form of objects and methods. INC 448 Advanced Process Control, 2005

  17. Direct and Fieldbus access direct connection fieldbus connection client application (OPC client) client application (OPC client) clients and servers run as parallel processes (local) OPC server (local) OPC server FB Manager fieldbus proprietary protocol I/O devices can also be a point-to-point link fieldbus fieldbus The OPC server is running all the time, as soon as at least one client is present FB agent FB agent PLC PLC INC 448 Advanced Process Control, 2005

  18. Full-fledged COM/DCOM across multiple nodes connectivity node Ethernet app3 application 2 (OPC client) application 1 (OPC client) TCP/IP TCP/IP panel OPC server for BrandZ OPC server for BrandY OPC server for simulation node 1 OPC server for BrandX Fieldbus Y Fieldbus X drivers input / output to plant The OPC servers supports multiple clients and servers on the same, or on remote nodes. They run as separate processes (as soon as at least one client is requesting them) INC 448 Advanced Process Control, 2005

  19. OPC technologies ActiveX Object Linking and Embedding (OLE) OLE for Process Control (OPC) (Distributed) Component Object Model (COM / DCOM) Transport (TCP-IP, UDP, Queued) only between nodes Ethernet OPC bases on Microsoft's COM/DCOM technology (i.e. it only works on Windows platforms). Effort to port it to other platforms (Linux) and web transport protocols (XML) are in progress. Advantages are the direct integration into all applications, such as Excel. INC 448 Advanced Process Control, 2005

  20. Structure of an OPC server OPC/COM Interfaces OPC Group & Item Management Item Data Optimization and Monitoring Device Specific Protocol Logic Hardware Connection Management INC 448 Advanced Process Control, 2005

  21. OPC Overview • OPC Common • OPC Data Access • OPC Alarms and Events Specification • OPC Historical Data Specification • Applications INC 448 Advanced Process Control, 2005

  22. OPC DA: Scope of specification An OPC DA Server is configured using the information coming from the development tools for the controllers OPC DA Cliente.g. visualization OPC DA Cliente.g. performanceindicator OPC DA specified interface OPC DA Server Variables defined in the controllers are mirrored to the OPC DA server tags e.g. Ethernet controllers controller controller field bus plant measurement points field devices INC 448 Advanced Process Control, 2005

  23. OPC DA: Example of access to a variable controller development OPC application Reactor_1.Program2 ReadItem ("OPC:Reactor1: Program2.MotorSpeed") MW%1003 MotorSpeed MW%1004 Temperature Value: 112 … …. load symbol table symbols OPC server code Get (192.162.0.2), MW%1003) Return (MW%1003, 112) Network Program 2 Reactor_1 Marker: MW%1003 analog input to : IXD.11.2.1 Oven controller INC 448 Advanced Process Control, 2005

  24. TAG TAG TAG OPC DA:Objects as viewed by the OPC server An OPC server is structured as a directory with root, branches and leaves (items) Process Line 1 Tag Name Controller 1 Level_1 Controller 2 An item is identified by its "fully qualified ItemID",e.g. "Process_Line_1.Controller_2.Level_2" Controller_3.Prog_1 Level_2 Controller_3.Prog_2 Ramp4 Cell 1 the hierarchical position may differ from the fully qualified ItemID this will be detailed under „browsing“ Machine 2 Branches may contain other branches and items The structure may also be flat instead of hierarchical This structure is defined during engineering of the attached devices and sensor/actors. (Intelligent servers could configure themselves by reading the attached devices) INC 448 Advanced Process Control, 2005

  25. TAG TAG TAG TAG TAG OPC DA: Objects as viewed by the OPC client Each client structures its items by groups, independently from the server. Initially, the client browses the server structure to check if the items it is interested in exist. A client registers its groups and items at the server. The server keeps the structure of all its clients. clients Client1 Client2 GroupX GroupZ Item1 Item2 Item3 Item1 Item2 Server root server Area 1 Temperature Oven_1 Heat_On Level Tank_1 Empty_Valve Area 2 Fill_Valve Area 51 INC 448 Advanced Process Control, 2005

  26. OPC DA: Item properties The process data are represented by three dynamic properties of an item: value: numerical or text time-stamp: the time at which this data was transmitted from the PLC to the server this time is UTC (Greenwich Winter time), not local time. quality: validity of the reading (not readable, dubious data, o.k.) (when writing, only the value is used) INC 448 Advanced Process Control, 2005

  27. OPC DA: Item types Each item value has a type: When accessing an item, the client may request that it is returned with a specific type, which could be different from the server's type. (The server's type is returned by browsing) Type conversion is left to the server, there are no rules whether and how a server does the conversion. (use with caution) Care must be taken that the data types in the programming language or in the database match those of the OPC Server. Items also may have engineering units, but this optionis not often used. Boolean, Character, Byte, (1 byte) Word, (2 bytes) Double Word, (4 bytes) Short Integer (2 bytes) Integer (4 bytes) Long Integer: Long Unsigned Integer Single Float (4 bytes) Double Float (8 bytes) Currency, Date, String, Array of "the above" INC 448 Advanced Process Control, 2005

  28. OPC DA: Program - initialising a connection find out existing OPC servers myDummyServer.GetOPCServers create an OPCServer object myServer = new OPCServer connect to that OPC server myServer.Connect create an OPCBrowser object create an OPCGroups object Set myBrowser = myServer.Browser Set myGroups = myServer.Groups create an OPCGroup object Set myGroup1 = myGroups.AddSet MyItems = MyGroup1.OPCItems FQItems1[1] = "Device1.Temp1" ClientHandle1[1] = 101 ReDim ServerHandle1(nrItems) ReDim ServerErrors1(nrItems) ReDim Value1(nrItems) build array of itemschecking with the browser that these items exist in this server next group add item array to the group myGroup1.AddItems activate and subscribe group myGroup1.IsActive myGroup1.IsSubscribed INC 448 Advanced Process Control, 2005

  29. OPC DA: Libraries The OPC DA specification is not formal, conformance can hardly be checked against this document. To ensure that the standard is observed, the OPC foundation distributes on its website the DLLs (opcdaauto.dll, opccomn_ps,…) that contain the type libraries to access the OPC server. The vendors are not compelled to implement all features. For instance, the description of the variables is seldom used. Calling unimplemented functions causes exceptions that must be caught in Visual Basic with "On Error …" statements. There exist three versions of DA, 1.0, 2.0 and 3.0, that behave differently, however, older servers do not have a property indicating which version they support. INC 448 Advanced Process Control, 2005

  30. OPC DA: Custom Interface While the Automation Interface is easy to use and quite powerful, some OPC functions are missing and special operations can only be done in Visual C++ using the custom COM interface. This is only recommended for experienced programmers. IOPCCommon OPC server IOPCDataCallback OPC client IOPCServer IConnectionPointContainer IOPCServerShutdown IOPCItemProperties [IOPCServerPublicGroups] IConnectionPointContainer IOPCItemMgt OPC group [IOPCBrowseServerAddressSpace] IOPCGroupStateMgt IPersistFile [IOPCPublicGroupSteatMgt] IOPCSyncIO IOPCAsyncIO2 IConnectionPointContainer IEnumOPCItemAttributes IOPCSyncIO IDataObject INC 448 Advanced Process Control, 2005

  31. OPC Overview • OPC Common • OPC Data Access • OPC Alarms and Events Specification • OPC Historical Data Specification • Applications INC 448 Advanced Process Control, 2005

  32. OPC AE: Configuration An OPC AE Server is configured using the information coming from the development tools for the controllers OPC AE Cliente.g. event logger OPC AE Cliente.g. alarm printer OPC A&E specified interface OPC AE Server Events defined in the controllers are mirrored to the OPC AE server event notification events e.g. Ethernet controllers controller controller field bus plant measurement points field devices INC 448 Advanced Process Control, 2005

  33. OPC AE: Purpose The controllers (PLC) generate events in response to changes in the plant variables. together with their precise time of occurrence, type, severity and associated message for the human operator. An OPC Event server registers these events and makes them available to several clients A particular class of events are the alarms, which are detailed events that may require acknowledgement. The OPC Alarms & Events Interface gives access to the OPC Event server, allowing to: - browse the OPC A&E Server for predefined events. - enable or disable alarms and events - subscribe to alarms and events of interest - receive the event and alarm notifications with the associated attributes - acknowledge alarms INC 448 Advanced Process Control, 2005

  34. OPC AE: Displaying Alarms and Events Alarms and events are usually displayed differently on an operator screen. - Events are displayed in an event list that can become quite long (typically 1000 entries), entries are not cleared when the source of the event returns to normal - Alarms are displayed in a short list (typically 50 alarms) appearance changes when the alarm is acknowledged, an alarm line is cleared when the alarm signal is cleared. Ackcheckbox INC 448 Advanced Process Control, 2005

  35. OPC AE: Summary alarms and events Event Alarm AE Client AE Client OPC AE Server OPC AE Server alarm notification (source, timestamp, message, condition, subcondition, severity, type) event notification (source, timestamp, message) message Condition timestamp EventFB message controller controller INC 448 Advanced Process Control, 2005

  36. OPC Overview • OPC Common • OPC Data Access • OPC Alarms and Events Specification • OPC Historical Data Specification • Applications INC 448 Advanced Process Control, 2005

  37. OPC HDA: Historical Data Access e.g. Trend Analysis e.g. Event Logger HDA Clients independent processes OPC HDA Server hidden history database calculations raw and ordered data collector proprietarydata acquisition OPC DA Server Field device Field device INC 448 Advanced Process Control, 2005

  38. OPC HDA: Purpose An OPC HDA server gives access to a historical data base (logs) in which data from the process have been collected and time-stamped, possibly through an OPC DA interface. The OPC HDA interface clients, such as trend analysis, product tracking or data mining, that require ordered access these data logs. The OPC HDA interface allows to: - browse the historical data base - retrieve data through proper filtering, e.g. by date range, by identity, by property - build aggregates over the retrieved data, such as average, minimum, maximum. - enter new entries, correct entries or remove entries - enter / delete annotations in the history data base INC 448 Advanced Process Control, 2005

  39. OPC HDA: Application • Parameters: • time scale (with possible offset, zoom, pan) • amplitude scale (low range, high range, scale units) • style: smoothed, stepped, filled (several ways to display the same data) • extrapolate: how to display values not received (e.g. because they did not yet change) log: how were data sampled INC 448 Advanced Process Control, 2005

  40. OPC HDA: Automation Interface summary OPCHDAServer An instance of an OPC HDA Server. An OPCHDAServer object must be created to can get references to other objects. A collection containing all the OPCHDAItem objects this client has created within the scope of the OPCHDAServer object OPCHDAItems (col) An object that maintains the item’s definition. Note the Custom Interface does not provide a separate Item Object. OPCHDAItem OPCHDAItem An object that browses item names in the server’s configuration. OPCHDABrowsers An collection containing a series of either OPCHDAValue or OPCHDAEntry objects, representing historical values of an item. OPCHDAHistory OPCHDAValue An object that represents a discrete historical value for an item or an attribute. OPCHDAValue OPCHDAEntry An object that extends the OPCHDAValue object to include additional information OPCHDAEntry INC 448 Advanced Process Control, 2005

  41. OPC Overview • OPC Common • OPC Data Access • OPC Alarms and Events Specification • OPC Historical Data Specification • Applications INC 448 Advanced Process Control, 2005

  42. Applications: OPC & SCADA HMI Application functions ActiveX Command language & procedures ODBC/SQL Historydata base OPC AE Reporting & Logging Alarm & Event handling Remote Device Configuration Historian OPC DA Process data base Measurand processing FDT / DTM / XML Communication stream Data Acquisition Field protocols: 101, 61850, HTTP standards INC 448 Advanced Process Control, 2005

  43. Applications: OPC & SCADA browser on same or other machine (IE, Netscape,…) web server (IIS, TomCat) page logic code-behind (servlets, .NET web-pages (HTM, JSP, ASP,..) scripts & code (Java, Perl, C#,..) data base Model-Viewer-Controller INC 448 Advanced Process Control, 2005

  44. The .NET Framework VB C++ C# JScript … Visual Studio.NET Common Language Specification WindowsForms ASP.NET: Web Services and Web Forms WindowsForms ADO.NET: Data and XML Base Class Library Common Language Runtime INC 448 Advanced Process Control, 2005

  45. Example of .NET application INC 448 Advanced Process Control, 2005

  46. Example of JAVA application http://www.netmodule.com/e/produkte/jpc.asp INC 448 Advanced Process Control, 2005

  47. SUMMARY Resource: http://www.matrikonopc.com/index.html INC 448 Advanced Process Control, 2005

More Related