You are on page 1of 19

OPC Tutorial

Printed version of the online multimedia tutorial


To view the online version visit:
www.matrikon.com/tutorial
Welcome & Introduction

Hello! My name is Randy Kondor and I am


Matrikon’s OPC Product Manager. As you may
already know, OPC is one of the world’s fastest
growing standards for the exchange of process
control data. This vendor independent multimedia
presentation provides a quick introductory overview
of OPC to point you in the right direction with minimal
effort. We will talk about the vision of OPC, cover a
case study, and provide more information about the
various OPC specifications. After this presentation
you will understand the basics of OPC and the
knowledge required to begin integrating OPC into
your current system. To get started, please choose
from one of the modules in the main window.

Module 1
OPC Basics: Introduction to OPC

Module 2
Case Study: Proprietary versus OPC Connectivity

Module 3
Background Information: The OPC Foundation &
OPC Specifications

Module 4
OPC DA: Real-Time Data Access

Module 5
OPC HDA: Historical Data Access

Module 6
OPC Summary: Additional Resources

2
Module 1: OPC Basics
Introduction to OPC

Introduction to OPC

• OPC standardizes the communication of


process control data
• OPC standardizes on a technology rather
than a product
• OPC provides true interoperability and
scalability
• OPC reduces implementation time and costs

The purpose of OPC is to provide a standards-based


infrastructure for the exchange of process control
data. For example, manufacturers have many
different data sources such as PLCs, DCSs,
databases, gauges, RTUs and other devices. This
data is available through different connections such
as serial, Ethernet, or even Radio transmissions.
Different operating systems like Windows, UNIX,
DOS and VMS, are also used by many process
control applications.

In the past, vendors would capture this data in their


own applications using their own device interfaces.
The data would be kept in a proprietary format, which
meant that you could only access your data using
tools from the same vendor who originally locked the
data. You were then forced to return to that vendor
every time you needed a system change or
expansion.

3
In contrast, OPC standardizes on a technology rather
than a product. By using the OPC set of standards,
data can be passed from any data source to any
OPC compliant application. These applications
include Human Machine Interfaces (or HMIs),
trenders, spreadsheets, data archivers, Enterprise
Resource Planning applications, and others.

OPC is a communication standard that provides true


interoperability and scalability. This enables you to
visualize, analyze, report, or do anything you want,
with applications from almost any vendor using one
or more of the OPC specifications.

By selecting the standards-based OPC technology,


you enable true interoperability, reduce your
implementation costs, and build a fully scalable
system for the future.

OPC Definition

OPC is a published industrial standard for system


interconnectivity. The OPC Foundation maintains all
the OPC specifications. OPC stands for OLE for
Process Control. It uses Microsoft’s COM and
DCOM technology to enable applications to
exchange data on one or more computers using a
client/server architecture. OPC defines a common set
of interfaces. So applications retrieve data in exactly
the same format regardless of whether the data
source is a PLC, DCS, gauge, analyzer, software
application or anything else. As a result, OPC is as
an out-of-the-box, plug and play communication
solution.

4
Module 2: Case Study
Proprietary versus OPC Connectivity

Common Plant Requirements

• Petrochemical plant needed to monitor


equipment
• Three different applications were needed to
analyze data
• Three different devices generated data

To better understand OPC, let’s have a look at a


specific example. In this case, a very large
petrochemical plant wanted to monitor their turbines
using three applications; a Human Machine Interface,
or HMI, for visualization, a Process Historian for data
storage, and a machine condition monitoring
application.

The data would come from three different data


sources; a PLC, a vibration monitoring system, and a
calculation engine.

Heading into the project, the plant had three common


requirements:

1. Minimize device loads by minimizing data


requests
2. Quickly and easily implement a
communication infrastructure
3. Minimize implementation and acquisition
costs

5
The Proprietary Solution

• Proprietary solution required many custom


drivers
• Multiple device drivers would create too
many data requests
• Lengthy implementation time and excessive
costs incurred

The first option was to use the proprietary


connectivity method. Each application would
communicate with each data source using its own
interface, or driver.

The HMI needed three drivers to communicate with


each of the data sources. One to communicate with
the PLC using the TSAA protocol, a second to
retrieve data from the vibration monitoring system
using Modbus, and a third to retrieve preconfigured
calculations from the calculation engine using DDE.

The process historian also needed three drivers as


did the machine condition monitor. In total, nine
custom drivers were needed.

In this case, you will notice that each data source


would have had to provide the same data three
times: once for each application and its associated
driver. This would have created a tremendous load
on each data source due to an excessive number of
data requests.

6
It was estimated that it would take approximately 10
days to complete the installation and commissioning
of the drivers, at a cost of over $50,000 for the
software and associated labor.

The OPC Solution

• OPC solution minimizes devices drivers


• OPC drivers are readily available
• OPC reduces device loads significantly
• Implementation time and all costs drastically
reduced

Now let’s take a look at the OPC solution using the


same data sources and software applications. Here,
we used one OPC Server for the PLC, one for the
Vibration Monitoring System, and one for the
Calculation Engine. Since the HMI, Process
Historian, and the Machine Condition Monitor already
supported OPC, we only needed three interfaces,
which was one third of the previous total. Because
OPC is a popular communication standard, the
interfaces were available off-the-shelf, so no custom
software development was needed.

7
Notice that there is only one connection between
each OPC server and its corresponding data source.
When an OPC Server received three data read
requests for the same point, it only had to send a
single request to its data source. This drastically
reduced the data request loads on each data source,
to a third of the proprietary method, and significantly
increased the performance for slow serial protocols
such as Modbus.

The OPC solution only took 2 days to install and


commission, at a cost of less than $10,000 for the
software and associated services.

The OPC solution helped the plant meet all of their


requirements. It reduced data loads on each device,
minimized implementation time and reduced their
software acquisition costs. All of this was achieved
with commercial off-the-shelf software.

8
Module 3: Background Information
The OPC Foundation and OPC Specifications

OPC Foundation

• OPC Foundation is a non-profit organization


• Made up of hundreds of companies
• Interoperability sessions ensure OPC
product intercommunication
• OPC Compliant products must pass OPC
Compliancy test

The OPC Foundation is a non-profit international


organization whose membership is made up of
hundreds of companies throughout the world. It is
responsible for establishing and maintaining the OPC
specifications and strives to maintain interoperability.

OPC Interoperability sessions are held on a periodic


basis around the world. During these sessions,
vendors, who may also be competitors, send their
technical experts to connect their OPC products with
others. If they identify a connectivity problem,
vendors can get together immediately to resolve the
issue. This is all done in an effort to ensure that users
have the best connectivity experience when they
connect multi-vendor applications together. So
check when your vendor last participated in an OPC
Foundation Interoperability session.

9
The OPC Foundation has also developed an OPC
Compliance test suite. Those that successfully pass
the test can submit their results to the OPC
Foundation and display the OPC Compliance Logo
on their product.

The OPC compliance logo indicates that the OPC


server complies with a particular OPC specification.
However, the OPC Compliance logo does not mean
that all OPC servers are the same. In fact, OPC
servers can vary greatly in speed, reliability,
capability and interoperability, which is partly why
OPC Servers also vary greatly in price. So check with
your vendor about the guarantees they offer.

10
OPC Specifications

OPC is a published industrial standard for the


exchange of process control data and is available to
anyone interested in developing their own OPC
products. While there are many OPC specifications,
here are some of the more common ones you will
encounter:

OPC Data Access, or OPC DA, provides access to


real time process data. Using OPC DA, one can ask
the OPC server for the most recent values of flows,
pressures, levels, temperatures, densities, and more.

OPC Historical Data Access, or OPC HDA, is used to


retrieve and analyze historical process data, which is
typically stored in a Process Data Archiver, database,
or RTU.

OPC Alarms and Events, or OPC A&E, is used to


exchange process alarms and events. Operations
personnel can use OPC A&E to notify them of alarms
and obtain a sequence of events.

OPC Data eXchange, or OPC DX, defines how OPC


servers exchange data with other OPC servers.

OPC Extensible Markup Language, better known as


OPC XML, encapsulates process control data
making it available across all operating systems.

There are also other specifications such as OPC


Batch and OPC Security.

The OPC Foundation continues to update existing


specifications such as OPC DA 2.0 to OPC DA 3.0. It
is also working on new specifications like OPC for
Complex data and OPC for ERP systems. So, as
OPC evolves you can expect even more functionality
in the future.

It is important to select the correct OPC specification


for your application. For example OPC DA and OPC
HDA are separate specifications, and are used for
different purposes. Furthermore, each OPC
specification has a different release number such as
OPC DA release 1, 2 and OPC DA release 3. Check
with your vendor to find out the specifications and
releases they support.

11
Module 4: OPC DA
Real-Time Data Access

OPC DA Introduction

• OPC DA standardizes real-time data access


• Communication between all devices and
applications is consistent
• OPC DA is available for every major process
control system
• OPC DA secures scalability

OPC Data Access, or just OPC DA, provides a


standard way to access real-time data from process
control hardware and software.

With OPC DA, the communication between all


devices and applications is consistent. OPC DA
servers for PLCs, DCSs, or other devices provide
data in exactly the same format! Similarly, HMIs,
Process Historians and other applications accept
OPC data in the same format. This allows all of your
process control hardware and software to freely
exchange data, providing enterprise-wide
interoperability.

OPC is a powerful connectivity method. As a result,


OPC servers are available for almost every major
device and software application on the market today.
Similarly, almost every process control application
supports OPC in the form of an OPC Client
connection.

12
Major manufacturers have adopted OPC DA as their
communication standard for the transfer of real-time
data to secure their system scalability. Selecting
OPC DA as your communication standard allows you
to easily expand your system as needed for years to
come.

OPC DA began with OPC DA 1.0, followed shortly by


OPC DA 1.0a. A later specification was OPC DA 2.0,
with minor clarifications appearing periodically, such
as OPC DA 2.01, 2.02, 2.03, etc. The most recent
specification is OPC DA 3.0. Vendors are
encouraged to keep their software current, so check
with your vendor about the specific version that they
support.

OPC DA Details

• Used only to read and write REAL-TIME data


• Provides access to single-value data items
called “points”
• Each point includes a value, a quality and a
timestamp
• Only uses latest values, not past values

OPC DA is used to read and write real-time data


exclusively. To access previous, or historical values,
you must use OPC HDA (Historical Data Access).
Let’s consider a flow meter measuring the flow rate of
a pump. In this example, the flow meter is connected
to a PLC, which in turn exchanges data with an HMI
client application.

13
OPC DA provides access to single-value items,
called points. For instance, a flow controller will have
multiple points, including a set point (FIC101.SP), a
process value (FIC101.PV) and others. OPC DA
treats each of these as a separate point. Each point
includes three attributes: a value, a quality, and a
timestamp.

OPC DA passes the value of the point, how reliable


the reading is, and at what time the reading was
taken, whether the point comes from a PLC, DCS or
a software application. For example, a flow reading
may have a value of “12.85 cubic feet per minute”, a
quality of “good” and a timestamp of “October 7,
2003 9:15 and 17.358 seconds”.

Typical questions posed by an OPC client and


answered by an OPC server are “What is the current
flow rate of FIC101?”, “Was this reading reliable?”,
and “At what time was the latest flow read?”

OPC DA Timestamps

• OPC servers provide a value, a quality and a


timestamp
• If no device timestamp is available (e.g.
Modbus), OPC servers provide a timestamp
• If a device timestamp is available, OPC
servers pass it on

OPC DA servers provide three attributes for every


point: a value, a quality and a timestamp.

OPC specifies that a timestamp must be provided for


each point, but it does not specify where the
timestamp must come from. So where does the
timestamp come from?

Sometimes a timestamp is not available from the


device. For example, Modbus does not provide a
timestamp from the PLC. In this situation, the OPC
server provides its own timestamp. But some device
vendors do provide a timestamp with each value. So
when the OPC server receives a reading, it also
receives the timestamp from the PLC and passes it
on.

An OPC server may be designed to ignore a


timestamp, even if one is available. Since OPC does
not specify where the timestamp must come from,
sometimes OPC server vendors choose to ignore the
device timestamp because this takes less
development effort. Always ask your vendor where
their timestamp comes from.

14
OPC DA Summary

So to summarize, OPC DA provides standard access


to real-time data and therefore provides open
connectivity. OPC systems benefit from true
interoperability and scalability that are used for
monitoring and supervisory control. OPC enables
applications to exchange, that is read and write, the
latest values and not past values. If you need to
access historical data, you must use OPC Historical
Data Access (HDA).

15
Module 5: OPC HDA
Historical Data Access

OPC HDA Introduction

• OPC Historical Data Access (HDA)


standardizes the exchange of archived data
• Historical Data is used for analysis: trending,
fault prediction, root cause investigation,
performance assessment, etc.
• Communication between all applications and
data archives (Process Historians, RTUs,
databases, etc) is consistent

OPC HDA, or Historical Data Access is used to


exchange archived process data. To access real-
time information you must use OPC Data Access,
also known as OPC DA.

Manufacturers around the world have been


purchasing and implementing data-storage systems
in mass numbers. These systems enable the usage
of valuable data analysis tools. Using archived data,
you can now accomplish trending, fault prediction,
root cause investigation, performance assessment
and other analysis from data that resides in almost
any source.

With OPC HDA, the exchange of historical data


between an application and any data-archive is
consistent. In other words, OPC HDA client
applications that implement trends, reports, or
spreadsheets, can retrieve archived process data
from Process Historians, RTUs or databases in
exactly the same manner. OPC HDA enables
enterprise-wide interoperability because all
applications that rely on historical data can finally rely
on a single industrial standard that is supported by all
the key vendors.

OPC HDA Servers exist on the market today for


every major process historian. Selecting OPC HDA
as your communication standard enables you to
access all of your archived data, providing true
interoperability.

16
OPC HDA Details

• Any OPC HDA Client application can access


archived data via OPC HDA
• Process Historians can answer queries
relating to analysis
• OPC HDA separates the Process Historian
from the client-side analysis application

Consider a flow meter measuring the flow rate of a


pump. In this example, the flow meter is connected
to a PLC, which in turn provides data to a process
historian. Remember, the process historian is used
to archive real-time data but once the data is
captured, it can be retrieved using OPC HDA. In
other words, the data can be accessed by any HDA
client application such as data trenders,
spreadsheets, and even reporting applications, in
one consistent way by using OPC HDA.

Typical questions asked by an HDA client application


and answered by a Process Historian are:
1. What were the values of FIC101.PV over the
past week, or
2. What was the average daily flow during the
past Month, or even
3. What was the total monthly flow for each
month in the past year?

OPC HDA separates the process historian from the


analysis tool. Imagine now that any application can
connect to any data-archive. This enables users to
change data archives and applications independently
of each other.

17
OPC HDA Versus Relational Data

Standards Usage
• OPC HDA - process data
• ODBC/SQL – relational/business data
• HDA and ODBC/SQL are complementary

OPC HDA is a widespread standard to access


historical process data. Other popular standards are
SQL (sometimes pronounced sequel), or Structured
Query Language, and ODBC, Open Database
Connectivity. But, while OPC HDA is used for
process data, SQL and ODBC are used for business,
or relational data.

It is important to note that the aim of OPC HDA is to


access historical process data, and not business
data. As such, OPC HDA and ODBC or SQL are not
competing standards, but highly complementary
ones.

OPC HDA is an open standard that decouples


archived data such as a process historian from HDA
Client applications. Therefore, historical data can be
exchanged freely between data archivers and
analysis applications. Also, archived data and
applications can be added and removed
independently of each other so your system will have
true interoperability from the beginning.

18
Module 6: Additional Resources
Matrikon Advantage and free downloads

Matrikon is the world's largest OPC developer. We Website: Visit the www.matrikon.com/opc for
provide connectivity to every major control system additional OPC resources, current news and
and application on the market, with a collection of products
over 500 interfaces. Our vendor interoperability and
OPC compliance are guaranteed. So far, we have Webinars: Sign-up to attend an online OPC
attracted over 30,000 users and 100,000 installations information session at www.matrikon.com
around the world.
OPC Newsletter: Subscribe to Konnections, a
Whether you need real-time process control data, regular and current source of OPC news and
historical trends, or even the transfer of events, OPC information at www.matrikon.com
is an excellent standard for your data exchange
requirements. With OPC, you can use multi-vendor OPC Drivers & Tools: Browse the list of OPC server
solutions that provide true interoperability, and create and client tools available at www.matrikon.com/opc
a best-of-breed solution. This helps to reduce the
total project integration time and costs, while Share this Presentation: Invite a friend or collegue
providing a scalable system that can be easily to view this presentation
modified in the future.
Comments & Questions: Provide feedback, tell us
I encourage you learn more about OPC. For about your project or request to speak to an OPC
example what affect OPC has on data transfer rates, product specialist. See contact information below.
how OPC works with SCADA applications, dealing
with networking issues, implementing redundancy
and other topics.

For more information visit the OPC Foundation


website or the Matrikon website. Or just click the
“additional resources” link below. There you can sign
up to attend a live OPC webinar, download and
evaluate OPC tools and drivers, read a variety of
OPC whitepapers and learn more about what it takes
to implement OPC. Or simply contact us so we can
answer any questions you may have.

Inquiries or to request a copy of the OPC Online


Tutorial on CD:

Matrikon
1800, 10405 Jasper Avenue
Edmonton, Alberta, Canada
T5J 3N4

Telephone: 1-780-448-1010
Fax: 1-780-448-9191
E-mail: opcinfo@matrikon.com
Website: www.matrikon.com

19

You might also like