Beginners Guide To OPC V2
Beginners Guide To OPC V2
Beginners Guide To OPC V2
John and I created this guide to help users that are new to the industrial automation space, also
known as operations technology or OT, or just new to the software side of operations
technology. We are approaching the subject based on some commonly asked questions that our
team hears and in this Version 2 of the guide we have added questions that we have heard from
you since our first guide was published.
Why OPC?
Before we get into what the OPC acronym stands for it’s important to understand at a
high level the business problem it set out to solve.
In the years following 1995, OPC suppliers sprung up and user choice was finally
available. A user could choose HMI from Vendor A and have easy connectivity to control
hardware in their plant from Vendors B and C. They could share information between
software applications provided those software applications supported the OPC standard.
Since then we’ve heard OPC stand for Open Productive Communications, but today the
official OPC Foundation meaning is Open Platform Communications. The goal remains
the same: Eliminate barriers and obstacles to interoperability between automation
software and hardware platforms to give users a choice.
Think of an OPC Server like a protocol converter, OPC Servers talk to a device or devices
using the specialized protocols of the devices, and then provide access to that data using
the standardized formats defined by the OPC Classic and OPC UA specifications.
Typically an OPC Server doesn’t do anything until an OPC client request to read or write
data. Some OPC servers can be configured to poll data from devices even in the absence
of client requests. This is typically done to allow an OPC server to have current data in
its internal cache and ready to go when a client requests it, but comes at the price of
generating communications traffic that may not be required. Many OPC servers provide
flexibility for the user to configure the behavior to suit their application needs.
Why do I need OPC servers if my control hardware vendor says they support
OPC?
Win: Welcome to the evolving world of OPC. When hardware suppliers say they support
OPC, they often aren’t meaning they have embedded an OPC server into their hardware
directly. What they mean is that they have OPC server software that runs on a Windows
based computer somewhere that talks to their hardware and exposes data using one or
more of the OPC standards. Also for some hardware suppliers, there may be additional
licensing fees to enable this OPC server functionality. It sounds better in marketing for
them to just say “we support OPC”, but we do hear often from users that they find this
confusing. Always clarify what your vendor says.
Now some vendors are beginning to leverage the multi-platform capabilities and embed
OPC UA servers directly into their PLCs. This can be quite handy if your HMI or SCADA
software supports OPC UA. If your client applications don’t support OPC UA, there are
OPC Gateway applications that can help you bridge from OPC UA to DA.
Do OPC servers have to run on Server class computers and operating systems?
John: OPC servers do not need server class hardware or operating systems. Some
vendors may require this for their specific implementations, but the OPC standards do
not dictate this. OPC server software is often fairly lightweight and can easily co-exist
with other software applications on a desktop PC. Check with your OPC server supplier
for your specific application’s requirements to be sure. Software Toolbox’s products have
a specification page on each product website area though we typically do not require
server class hardware or operating systems for our OPC servers.
How can 2 OPC servers talk to each other? How can two OPC clients talk to each
other?
Win: In the OPC world, clients talk to servers. Servers talk to clients. The good news is
there are ways for OPC servers to talk to other OPC servers and the same for OPC clients.
Why might two OPC servers need to communicate? Imagine you have PLC vendor A and
PLC Vendor B and there is an OPC server communicating to each one using the two
different PLC vendor’s specific device protocols. You want to move data from PLC A to
PLC B, which means the 2 different OPC Servers need to talk with each other. You can
do this using OPC Bridging software applications. OPC Bridging software applications
are OPC client applications that can connect to many different OPC servers and then
allow you to map data movement between the two OPC servers, specifying direction,
data transformations, etc. You can learn more about OPC bridging in our OPC bridging
blog post.
In the case of OPC clients talking to each other, the most common application would be
two different SCADA or HMI software applications needing to exchange data. The first
solution would be to see if the HMI or SCADA software supports an OPC Server interface
in addition to being an OPC client. Many do, and if so then problem solved. The two
Why so many standards? DA, A&E, HDA, UA – seems like alphabet soup?
John: There are multiple standards because
there are multiple software to software and
software to hardware problems that the
independent OPC Foundation set out to solve
starting in 1995. Each standard addresses a
different problem type.
All of these were standards to address specific types of problems, but none were as
widely adopted as OPC DA, A&E, and HDA.
As a collection, these original OPC standards are now known as OPC Classic. It may be
“Classic” but to be clear, these standards are still widely used and implemented and there
are millions of installed OPC Classic servers and clients in the world. Examples of OPC
DA servers in the Software Toolbox offering include TOP Server for Wonderware,
OmniServer, and Cogent Datahub.
The OPC A&E standard defined a common format to exchange that information. Alarms
have the alarm type, limit, timestamp, value, possibly a string message, acknowledgment
status and more, and all that information needs to remain together as a single “bundle”
of information. OPC DA wasn’t designed to that. Below is an example of the types of
information the OPC A&E standard allows to be shared in a single call between a client
and server.
OPC A&E provides the specialized function calls and data format for this data type. So
when an OPC client says it supports A&E that means it supports these specialized
function calls and data formats. In the Software Toolbox offering, the Cogent DataHub
A historical data recordset will consist of a variety of data samples with the timestamps
for those samples, retrieved at the request of a client application to “Give me all the
values for Tag1, Tag2, Tag3, etc for the time range of the last 2 hours”. Like OPC A&E,
the OPC HDA standards provide specialized function calls and data formats to pass these
blocks of information between software applications.
In the Software Toolbox offerings, Flow can connect to multiple Process Historians using
OPC HDA as well as databases, Information Platform for industrial reporting and
operational analysis. Dream Report can also connect to OPC HDA and many other data
sources to produce a wide range of reports.
With the OPC Classic interfaces, developers had to include foundational OPC code over
and over again for the different interfaces standards. Now they can use a unified code-
base and implement whatever profiles they need. So the classic OPC standards became
OPC UA Profiles and an OPC UA server or client describes itself based on what profiles it
supports such as OPC UA DA profile, A&E profile, HDA profile, etc.
The most popular benefit of OPC UA is that it can be used across operating system
platforms, communicates using a single TCP/IP port, offers SSL encryption, and allows
for security rights control to the tag level based on user credentials, provided the OPC
client and server have implemented all the required facets.
Looking to the future, because OPC UA had to support the more complex data structures
of Alarms & Events and Historical Data, it was a logical extension to allow for support of
just about any complex data model and provide mechanisms for the implementation of
other complex data models for other standards to use OPC UA as the transport.
Software Toolbox offerings using OPC UA include TOP Server for Wonderware,
Omniserver, Cogent DataHub, OPC Data Client, OPC Data Logger and SLIK-DA for UA.
This is useful when you have existing systems that you need to integrate with OPC UA
but you aren’t able to or ready to upgrade all the software in your systems. Simple
gateway applications make the transition possible.
Some people also call this an OPC wrapper or OPC UA wrapper, or OPC DA wrapper.
They key is that you need a solution that is fast, easily configured, and supports the
necessary OPC UA security features that you plan to use.
Many OPC clients, if they support OPC DA 3.x, they will support 2.x,
and they might support OPC 1.x. Bottom line the client application
has to support one of the versions of the OPC DA standard that the
server offers. But what if the client doesn’t?
If you find you need integrate between OPC DA 2 and DA 3 clients and servers and either
your OPC client or server is missing the support you need, the Cogent DataHub supports
OPC DA 2, OPC DA3, and OPC UA and can be an OPC Client and Server and would be a
good solution.
If you happen to have an OPC DA 1.x client or server and need to integrate it with OPC
DA 2, 3 or even OPC UA, the TOP Server OPC Client Driver would be a good solution.
OPC Quality is a way for OPC Servers to tell OPC clients more about the value they are
providing. The way this is done is by passing a number along with the value and
timestamp. In OPC speak we call this VQT or “Value, Quality, Timestamp”. The OPC
quality number is really determined by setting bits within a word, and that results in
different values. A value of 192 means “Good” quality, which means the last time the
OPC server polled the device it was able to successfully get data, so the OPC client can
trust that value. A value of 0 will mean Bad Quality and typically means that there was a
communications failure between the OPC server and the device it is polling. There are a
whole range of other values that the OPC server can use to indicate why the quality is
bad, but they are not widely implemented. We have a detailed application note that
shows more of the common OPC quality values.
What matters the most is that OPC client applications typically can be configured to
cause a change in how they show values to the user on an operator screen, or in a
historical database, so that people know not to trust that value and they know why.
What about Devices that store events and send data in batches with timestamps?
Some devices store a timestamp for when the data last changed, and can pass that to the
OPC server using the device specific communications protocol. If the device supports
that and the OPC server supports it, device timestamps can be used. Examples of
Software Toolbox products that support device timestamps for protocols that support the
functionality include TOP Server DNP, IEC 61850, and IEC 60870 drivers.
I need to share data between a control system and a metering package or between
2 different control systems that have OPC servers
John: What you need in this case is an OPC Bridge application. An OPC Bridge
application is a product that is an OPC client, and thus can talk to OPC DA and OPC UA
servers, and has functionality to allow you to:
Create mappings between tags in each control system through a visual user interface
Define whether data flows one direction or both directions between the systems
Define changes such as scaling to be applied to the data values if required
Bridge to non-OPC data sources or destinations, if required, for your application
Bridge between different OPC data sources, including OPC UA to OPC DA and vice
versa
To be sure, there are more factors, but most conversations we have start there. More and more
we are seeing the need to be able to share data securely, rapidly, with more and more parties,
which presents a cybersecurity challenge. There are unique tools available to share data without
having to open inbound firewall ports, and without significantly sacrificing performance.
Probably the most common scenario we see is to place the OPC servers in the Automation Layer
of a network, as close to the data source as possible, to insure performance and to make data
available rapidly to other applications that reside in the Automation layer. Then, using tools for
tunneling, including OPC UA, data is taken to a DMZ layer and then up to the business layer,
with the DMZ providing the necessary filtering and isolation.
Win Worrall
Win studied software engineering and has been working at Software Toolbox
since 2007. Win started out in product support and has worked with
hundreds of users around the world with about every product in Software
Toolbox's mix. Win’s unique mix of development experience combined with
hands-on client experience enables him to deliver value to his clients. Win
currently is responsible for product management of the Cogent DataHub
offering within Software Toolbox's range of products and is part of the
company leadership team with various other responsibilities.
Our mission is to provide you with the right software package to solve your industrial operation challenges.