OPC Overview

Adam Hill Kepware Technologies/PTC Portland, ME (USA) Agenda

• Before OPC • OPC Foundation • OPC Client Communications • OPC Specifications – OPC DA – OPC HDA – OPC AE – OPC UA and Tunneling with OPC UA

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT What You Will Learn

1.What does OPC stand for? 2.What is the purpose of the OPC Foundation? 3.OPC specifies the communication between what and what?

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Before OPC Before OPC

• No standard exists for communication between devices (data sources) and computer interfaces (data gatherers).

• Proprietary connections and toolkits are developed by hardware vendors. – This limits users to one type of software and hardware package. • As users want to make more client connections to one device, or add different hardware, the problem gets sticky…

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Before OPC (cont.)

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Foundation OPC Foundation

• Formed in 1995 by a consortium of 5 companies: – Fisher-Rosemount, Rockwell, Opto 22, Intellution, and Intuitive Technology. • Now there are over 450 corporate members in the Foundation.

THE FOUNDATION’S MISSION “The mission of the OPC Foundation is to manage a global organization in which users, vendors and consortia collaborate to create data transfer standards for multi-vendor, multi-platform, secure and reliable interoperability in industrial automation.”

• To support this mission, the OPC Foundation: – Creates and maintains specifications – Ensures compliance with OPC specifications via certification testing – Collaborates with industry-leading standards organizations

May 14 – 16, 2019 OPC Foundation

• Approaching 500 Member Companies world wide • 80% North America and Europe and 20% Japan, China and Rest of the World • Thousands of OPC enabled products

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Board of Directors

• President and Chairman: Thomas Burke • Governing Board Member Companies: Ascolab, Beckhoff, Honeywell, ICONICS, Microsoft, SAP, Siemens, Yokogawa • Appoint officers, approve work items, and drive direction of OPC

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Programs and Evangelism

• Certification • Standard allow for interoperability – but unfortunately not all solutions are created equal • Self-certification tools exists for independent test and validation • Independent (3rd party) lab certification

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Programs and Evangelism

• Interoperability Workshops – Competitors cooperating for the benefit of the end user – Yearly event held in North America, Europe and Asia

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Evolution of OPC Acronym

• Originally, Object Linking and Embedding (OLE) for Process Control. – Object Linking and Embedding (OLE) was developed by Microsoft to allow embedding in documents and other objects. OLE 1.0, released in 1990, was the evolution of the original dynamic data exchange (DDE). DDE only transfers limited amounts of data between two running applications, while OLE maintains active links. OLE was also the foundation for COM technology. • Moved away from Microsoft OLE to become Open Process Control. • Open Platform Communication – OPC is now open connectivity via open standards.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Client-Server-Device Concept

THEN

OPC Specs

NOW Other Standards Client Communication Drivers

• Before the advent of OPC, each client connected directly to • OPC standardizes the connection specifications between a each device. With this approach, multiple clients could be client and a server (or also a client and an OPC-enabled asking the same device for the same data. This was not device, but this is uncommon). efficient or optimal for the device. • The server then bridges the communication from the client to the device, and the server is smart enough to know to maintain only one device connection so as not to overburden the device.

• Thus, the client-server-device architecture is optimized.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Client-Server-Device Concept

Friendly UI, Graphics and Visualization, Graphing, Client Alarming, Redundancy Communication Scalable and Driver Supportable

Seamless Data Source Connectivity, Interoperability with Other Software Apps

Scalable and Supportable

Robust Friendly UI, Seamless Data Robust Hardware, Hardware, Graphics and Source Immune to Immune to Visualization, Connectivity, Electrical Noise Electrical Noise Graphing, Interoperability and Resistant to and Resistant to Alarming, with Other Vibration and Vibration and Redundancy Software Apps Impact Impact Scalable to Support One Device or Entire Plant, Great Customer Scalable and Support Supportable

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Client Communications OPC Client Communications

These options are controlled through settings in a connected client. • Synchronous or asynchronous requests for polls or explicit (one-time) reads • Poll data or subscribe to data – Polls require the server to return data at a set interval – Subscriptions work on exception-based reads, where data is updated to the client when a data change event is detected by the server • Read from the device memory or server cache

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Client-Server Communications: Synchronous • Synchronous read/write will wait until the read or write has been completed before continuing the poll cycle

Go Poll Neighborhood A now, I will wait on the line till you are done.

Go Poll Neighborhood B now, I will wait on the line till you are done.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Client-Server Communications: Asynchronous • Asynchronous read/write executes the command and uses “call back events” for Go Poll Neighborhood A, call me back when you are when the read/writedone. has been completed.

Go Poll Neighborhood B, call me back when you are done.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Synchronous

Client

Server

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Asynchronous

Client

Server

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Client Communications Applied

• When would it be appropriate to use either asynchronous and synchronous reads? • What are the settings recommended for highest throughput? • Answer: Subscribe to items (if possible) or perform asynchronous polls or read from the server cache.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Specifications

OPC “Classic” or the original OPC specifications are: • OPC Data Access (DA) • OPC Alarms and Events (AE) • OPC Historical Data Access (HDA) • OPC XML Data Access (XML-DA) • OPC Data Exchange (DX) • OPC Security • OPC Batch • OPC Complex Data

NEW OPC STANDARDS ARE FIREWALL FRIENDLY (DCOM INDEPENDENT) AND ENCOMPASS THE MOST ADOPTED CLASSIC SPECIFICATIONS INTO A SINGLE INTERFACE • OPC .NET (OPC Express or Xi) – Runs on all Microsoft Platforms. • OPC Unified Architecture (UA) – Runs on any platform. – Allows for new information models and vendor specific models.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC DA Features

• Exchanges real-time data between client and server in the form of Value, Quality and Timestamp (VQT). • Supports browsing of available servers and information accessible in that server. • Items can be scanned at a particular rate (down to 10ms). • Supports reads, writes and subscriptions.

OPC

OPC Physical I/O

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT More on VQT

VALUE • The latest state of an item of interest.

QUALITY • Can I trust this state? Is the connection in error? • Refers to the connection between the server and the device. • If there is bad connection quality, the server returns “Unknown” value or the last good value.

TIMESTAMP • Freshness of the data. • This can come from the device or the OPC server depending on setup. • Is the clock accurate?

Good OPC Servers and Clients do not ignore any part of VQT!

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC DA Environment

• Dependent on Microsoft’s Distributed (DCOM); originally called "Network OLE". Remember “OLE for Process Control” used to be OPC. • Authentication controlled through Windows Component Services, not any 3rd party software product. • Microsoft Windows Domains or Workgroups only. • Inside the firewall. • No VPN Access.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Historical Data Access (HDA)

OPC DA is for real-time data, why the need for HDA?

WHY? • Ability to access and modify archived data for a specific time domain. • Read, Write and Playback raw or aggregated data.

WHY NOT? • Many end users just use OPC DA to get the raw real-time data into a client. • The client then handles the data archiving. • Based on DCOM.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC Alarms and Events (AE)

WHY? • Ability to evaluate alarms on the server level. • Alarms are central to the server

WHY NOT? • Just like HDA, many end users just use OPC DA to get the raw real-time data into a client. OPC AE • The client then handles the alarming. Alarms and • Based on DCOM. Events Server

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC UA OPC UA Environment

• Uses Binary/TCP and SOAP/HTTP for a Service-Oriented Architecture (SOA). • Meant to work on multiple Operating Systems (OS). Platform independence! • DCOM independent and Firewall/network barrier friendly. • Combines OPC “Classic” into a single service set.

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT OPC UA Connectivity

OPC UA • Endpoint to endpoint communication through a single dedicated TCP port (very easy to get through network barriers) • Data encryption to RSA standards and authentication based on the x509 Certificate standard. (This is the same encryption e-commerce uses)

opc.tcp://10.10.110.10:49320

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Compare UA to DA

OPC DA and DCOM OPC UA and TCP/Binary Must control security Optional authentication permissions through Windows handled by the application. Authentication and Windows Optional security settings Shell (Windows Platform (certificate exchange and dependence). encryption) which are handled by the application, and do not depend on the OS shell (Platform independence). Must drop the firewall or Allow an exception for one allow a long list of exceptions single port (49320 for for the different applications KEPServerEX) for OPC UA trying to communicate. communication. All machines must be on the Applications can reside on any same Local Area Network system, domain, or network (Workgroup or Domain). anywhere. Tunneling with OPC UA Why the Need for Tunneling?

When applications do not support OPC UA, but a communications path through barriers (such as across networks or firewalls) is needed, users can use an intermediate “tunneling” application.

Perhaps to: • Allow an OPC DA client on one network to talk to a device or an OPC DA server on a different network • Allow a non-OPC client on one network to talk to a device or OPC DA server on a different network • Enable a device on one network to exchange data with a device on another network • Add security to communications

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT What Does a Tunnel Look Like? Legend Communication Barriers Client Protocol (Firewalls, routers, other networks, the Internet) OPC UA Publish (OPC DA, OPC .NET, Request & Response OPC XML-DA, DDE, SuiteLink, NIO, etc.)

Device Data OPC UA Protocol

Device Protocol Device Read

Client App Client Side Server Side PLC or other (SCADA, HMI, Tunnel Tunnel data source Database, etc.) Application Applicaiton

Bulk Reads Monitored Items: Data from Subscription Queue May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Key Takeaways

• Before OPC • OPC DA • OPC UA (Tunneling) • Quick Use Case Example

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT Questions?

May 14 – 16, 2019 INTERNATIONAL SCHOOL OF HYDROCARBON MEASUREMENT