OPC UA Development

OPC UA WIKI

Introduction

OPC Unified Architecture (UA) follows today’s and future requirements of industrial communication needs. It unifies and extends the individual standards of the first generation OPC (also called OPC COM or OPC Classic) using a service oriented architecture (SOA) paradigm. This result is platform independent, scalable and high-performance communication infrastructure. The use in small devices of process and measurement technology with their specialized operating systems is just as well possible as the use in enterprise applications on Unix/Linux machines or Mainframes.

The rich information model can represent complex relationships of data and its semantics. Specially designed transport protocols offer highest communication speed and interoperability.

Furthermore OPC UA provides security mechanisms like authentification, authorization, encryption and data integrity based on the latest cryptographic standards such as PKI, AES, and SHA.

Concepts

OPC UA Is Service Oriented

The OPC UA architecture is a Service Orientated Architecture (SOA) and is based on different logical levels. All of the Base Services defined by OPC are abstract method descriptions which are protocol independent and provide the basis for the whole OPC UA functionality.

Transport

The transport layer transforms these methods into a protocol, which means it serializes/deserializes the data and transmits them over the network. Currently there are two TCP/IP based protocols specified for this purpose. One is a binary, high performance optimized TCP protocol and the second, a webservice based protocol. The binary protocol is mandatory and is supported by all UA stacks. Additional protocols are possible and may be added when necessary.

Data Modell

The OPC Information Model is not just a hierarchy based on folders, items and properties anymore, but a so-called Full Mesh Network based on Nodes instead. This network of Nodes can additionally transmit all varieties of meta information and diagnostic data. The closest image of a node would be an object, known from object-oriented programming (OOP). It can be composed of Variables that can be read or written, Methods which can be called, and Events which can be fired. An Event contains among other things a time of notification, a message and a severity. Nodes are used for process data as well as for all other types of meta data. The newly modeled OPC namespace now contains the Type Model used to describe all possible data types as well.

Expandability

Based on this new architecture, other organizations are specifying their own information source, the so-called companion specifications. One of the first of these specifications is the DI (device integration) model. It describes devices and forms a base for further companion specifications like ADI, PLCopen, or FDI, which for their part define own information models. Client software has the ability to verify which of the so-called Profiles a server supports. This way clients can detect whether a server only supports DA (data access) functionality or additionally A&C (alarms and conditions), HDA (historical data access), etc. Additionally, information can be obtained whether a server supports e.g. the DI profile and therefore the client knows that there will be DI-specific device descriptions as well as configuration and diagnostic information available.

Additional important features of OPC UA are:

  • service oriented architecture using a asynchronous request/response paradigm
  • combines all features of the previous “classic OPC” specifications
  • bulk operations for all access operations
  • bandwith-friendly transmission
  • redundancy support on client and server side, multiple redundancy
  • heartbeat for connection monitoring in both directions; i.e. the server as well as the client recognize failures
  • buffering of data and acknowledgements of transmitted data
  • lost connections do not lead to data loss anymore; lost data packages can be fetched again

OPC UA Services

Abstract Definition of Services 
The service oriented architecture (SOA) follows the request/response paradigm. OPC UA defines a fixed set of services with exactly defined parameters and behavior. These services are generic. There is for instance only one “Read” service for reading attributes, i.e. data as well as properties. There is a “Browse” for navigating through a UA server’s address space. 
The genericity and standardization of these Services assures interoperability. They are combined into so-called “service sets” according to their purpose.

The following list shows these groups of services.

Service Set Description
SecureChannel Service Set retrieve endpoint and security configuration to establish a secure connection
Session Service Set create and administrate user-specific connection between application
NodeManagement Service Set modify the server’s address space (if permitted)
View Service Set navigate and follow (hierarchical) references in the server’s address space, search for and filter information
Attribute Service Set read and write attributes of (an) node(s), especially the value attribute, but historical data or events as well
Method Service Set invoke methods which a server provides at the nodes in its address space
MonitoredItem Service Set create a set of attributes of nodes to be monitored by the server and for which changes should be reported
Subscription Service Set create, modify, or delete monitored items
Query Service Set perform a filtered search for information in the server’s address space

OPC UA Data Model

OPC UA defines a generic object model including the associated type system. In addition to this data model, rules have been defined to describe how to transform every physical system into a model conforming with OPC UA to represent it in an OPC UA server. Every kind of device, function, and system information can be described using this meta model. The base type system supports relationships between objects, so-called references, as well as multiple inheritance. Thus it can be compared to a modern object oriented programming language. The base model provides object and variable types as well as reference and data types. Based on this model, OPC UA can represent every kind of data including their metadata and semantics.

扫描二维码关注公众号,回复: 3537170 查看本文章

Uamodel.png

UA Models

The OPC UA data model forms the base for UA information models. Being specialized models, they extend the base by adding specific functionality like Data Acess, Alarms and Conditions, Historical Access or Programs.

Extensions

The data and type model is arbitrarily expandable. It is mandatory for a server to provide its type model, especially if it provides types which are not UA base types, the so-called “well known types”. The goal is to specify extensions as possible as industry-sector-specific models. This is worked out in additional specifications, so-called companion specifications. Here, the OPC Foundation collaborates with other organisations to obtain common UA conform representations.

OPC UA Security

UA security is a multilayer concept. It contains authentication and authorization as well as encryption and data integrity by signing. A distinction is made between application layer and transport layer security.

SecurityLayers.jpg

Application Layer

There are several security mechanisms on application layer. The user or operator of an application can be identified by a user/password combination, a Kerberos token, or a user certificate. The permissions can be adjusted for each single node: It is possible that a user is only allowed to read values, whereas an administrator may also have write access, but a guest may not even be able to browse a node. In addition to that, audit mechanisms are defined and a server may log which person has changed which value at which time (audit event, audit log).

Security is not optional, the features are integral parts of the specification and the UA stack.

Transport Layer

OPC UA defines message security for the binary as well as for the web service protocol. The OPC foundation did not invent a security mechanism but adopts well-established IT mechanisms. The authentication exclusively uses x509 certificates. It’s up to the application developer to decide to which certificate store the UA application is bound to. For instance, it is possible to use the Public Key Infrastructure (PKI) of an Active Directory.

OPC UA Applications

A UA application, no matter if client or server, is composed of several layers (see figure below).

Uaimplementation.png

UA Stack

The following tasks are in the responsibility of the UA stack:

  • encoding/decoding of messages (serialization)
  • transport related security features (secure channel layer)
  • transmission over the network (transport layer).

The operating system specific adaption is realized centrally in a platform layer (portability layer). Therefore, the .NET UA stack uses the .NET framework and the Java UA stack requires Java Runtime Environment (JRE).

The dark blue parts of the figure represent UA Stacks and are provided by the OPC Foundation. The portability layer of the ANSI C stack allows to port the stack to other platforms. A limited set of platform layers is provided by the OPC Foundation. Other platform layers, e.g. for IPv6, 64 bit, Linux, QNX, vxWorks, WindowsCE etc. are available from commercial suppliers.

Software Development Kit (Toolkit)

In addition to the OPC UA stack of the OPC Foundation, which provides a low-level interface, more, partly generic, functionality is desirable, especially on server side. This “glue code” between application and UA stack is typically encapsulated in libraries and provides a high-level interface and convenience functions for the application. SDKs or toolkits are offered by several OPC Foundation members and contain, apart from the libraries, examples, tutorials, and documentation as well as professional support. The SDKs contain the UA stack as well and thus provide full access to OPC UA technology for non-members of the OPC Foundation.

Open62541

open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.

Open

  • Based solely on IEC 62541
  • Open source license (Mozilla Public License v2.0)
  • Royalty free, available on GitHub

Portable

  • Written in C99 with architecture-specific plugins (POSIX, ...)
  • Runs on Windows, Linux, QNX, Android and diverse embedded systems
  • Compiled server can be smaller than 100kb

Scalable

  • Event-based architecture
  • Single or multi-threaded

Flexible

  • Information model can be modified at runtime
  • Generation of data types and information models from XML specification files

News

June 2018: Measurements for OPC UA PubSub over TSN

Our commercial partner Kalycito is publishing latency and jitter measurements for OPC UA PubSub over TSN based on open6251. Download the presentation for full details.

Mai 2018: PubSub Support

Support for the new OPC UA PubSub Extension (Part 14) based on UDP/multicast has landed on the master branch.

Download

Latest release: 0.3-rc2 (Updated 2 months ago)

Windows 
32 bit
 Windows 
64 bit
 Linux 
32 bit
 Linux 
64 bit
 Raspberry Pi 
(Raspbian OS)

Nightly single-file distributions and MSVS Windows binaries can be found here.

Single-file distribution and full source code:

open62541.c open62541.h .zip .tar.gz

Release notes:

This is the second release candidate of what will become open62541 v0.3. The API has been frozen and only backwards-compatible patches will be applied before v0.3. Compared to the RC1 (0.3-rc1) this version includes additional bugfixes and small improvements under the hood while keeping the same API as 0.3-rc1. For the final 0.3 release there is still the CTT compliance test missing.

open62541 (http://open62541.org) is an open source and free implementation of OPC UA (OPC Unified Architecture) written in the common subset of the C99 and C++98 languages. The library is usable with all major compilers and provides the necessary tools to implement dedicated OPC UA clients and servers, or to integrate OPC UA-based communication into existing applications. open62541 library is platform independent. All platform-specific functionality is implemented via exchangeable plugins. Plugin implementations are provided for the major operating systems.

open62541 is licensed under the Mozilla Public License v2.0. So the open62541 library can be used in projects that are not open source. Only changes to the open62541 library itself need to published under the same license. The plugins, as well as the server and client examples are in the public domain (CC0 license). They can be reused under any license and changes do not have to be published.

The most important changes compared to the 0.2 branch are as follows.

  • Support for encrypted SecureChannels
  • Support for node-based access control
  • Support for client-side subscriptions handling in the background
  • Support for custom storage layers for the information model
  • Improved lifecycle handling for nodes (constructors and destructors)
  • Improved documentation

The final release will be made in the coming weeks after a period of stabilisation and additional testing.

FreeOpcUa

FreeOpcUa is a project to implement an open-source (LGPL) OPC-UA stack and associated tools.

Currently FreeOpcUa is composed of

  • A LGPL C++ library to develop server and client OPC-UA applications. Python bindings can be found in the opcua-python repository. https://github.com/FreeOpcUa/freeopcua
  • A LGPL Python OPC-UA Python Client and Server library, written entirely in python, available at: https://github.com/FreeOpcUa/python-opcua (install using pip install opcua)
  • python-opcua

    LGPL Pure Python OPC-UA Client and Server

  • opcua-modeler

    GUI to create OPC UA models and export them as XML

  • opcua-client-gui

    OPC-UA GUI Client

  • freeopcua

    Open Source C++ OPC-UA Server and Client Library

  • A GUI client https://github.com/FreeOpcUa/opcua-client-gui (install using pip install freeopcua-client)
  • Command line tools installed with freeopcua-python https://github.com/FreeOpcUa/python-opcua/tree/master/tools
  • A GUI to create OPC UA nodes and save them to xml https://github.com/FreeOpcUa/opcua-modeler

  • Mailing list: https://groups.google.com/forum/#!forum/freeopcua
  • Source code: https://github.com/FreeOpcUa

Screenshot of client GUI:

Screenshot

Screenshot of modeler:

Screenshot

Unified Automation(commecial)

On this page you will find latest downloads and documentation. All content is offered free of charge, however if you download or install software from this page you automatically accept the Unified Automation Software License Agreement (SLA). The use of Software and Information is granted as described under “Evaluation License”. All rights reserved by Unified Automation GmbH.

The Software and Information available on this page is for evaluation purpose only. It is provided “AS IS” with no warranty of any kind, including the warranty of design, merchantability and fitness for a particular purpose.

To access the download links you must register at the Unified Automation web site and you must activate your account.

By download and/or installation you accept the conditions in the Software License Agreement.

Unified Automation Release PGP Signatures

All releases are cryptographically signed using OpenPGP-compliant signatures. Everyone is strongly encouraged to verify the integrity of downloaded files by verifying the corresponding signatures. This way you can ensure that the file downloaded files have not been corrupted or manipulated.

Information about verifying the PGP signatures of our Website downloads.

Download Categories

Documentation

In this section you can find different documentation and technical information.

OPC UA Clients

In this section you can find Client products that can be installed on a standard PC (e.g. UaExpert)

OPC UA Development

In this section you can find tools and products for developers. Only certain products are available in binary format for evaluation purpose only, versions for other platforms and compilers are available on request.

OPC UA Servers

In this section you can find evaluation versions of Server products that can be installed on a standard PC (x86).

Webinars

In this section you can find webinar recordings.

猜你喜欢

转载自blog.csdn.net/lightrain0/article/details/81365930