Business Intelligence Industry 4.0

OPC UA Pub/Sub – What Is It & How To Use It

OPC UA Publisher Subscriber

First products are using the latest OPC specification called OPC Unified Architecture (UA) v1.04. This interoperability standard enables new opportunities to increase the efficiency of and further automate production lines and systems. Reason enough to take a deep dive on the specification, its features and application scenarios.

From OPC Classic over OPC UA…

The first specification from the OPC Foundation released in 1996 and referred to as “OPC Classic” enabled secure and reliable exchange of data in the industrial automation space and other industries. The group of client/server standards enabled unified communication between different devices.

While the classic OPC version has been restricted to the Windows Operating System, the next evolution OPC UA which was released in 2008, is a platform independent service-oriented architecture.

OPC UA supports high scalability, availability and implements Internet capabilities as well as secure cross-platform data exchange. In addition, OPC UA addresses semantics and modeling capabilities in order to represent complex physical systems in digitalized mode. Due to this and several other features the IEC62541 specified OPC UA standard creates an ideal, open and free platform for intelligent production environments with great potential for the future and especially as data exchange technology for the Industrial IoT.

However, there is one significant limitation tied to the client/server model of the OPC technology. In this scheme a client requests information and receives response from a server. This approach is not feasible for the increasing amount of connected objects within Industry 4.0 models.

… to OPC UA pub/sub

In order to prepare OPC UA for the future the publisher/subscriber (pub/sub) extension has been developed. The new features enable a model in which a server sends its data to the network (publish) and every client can receive this data (subscribe). The OPC UA pub/sub specification remains compatible to all previous versions; thus communication via the client-server model is still possible.

OPC specifications work with multiple transport and message protocols. For OPC UA pub/sub MQTT with JSON encoding as well as UDP with binary encoding will be available.

MQTT is typically suited for IT/OT integrations as well as cloud based applications. The messaging protocol is extremely simple and lightweight. Therefore MQTT is a good fit for constrained devices and low-bandwidth, high-latency networks without deterministic requirements. Another advantage of MQTT is that it is supported by several industry heavyweights like Microsoft as the company’s Azure IoT Hub natively supports communication over the MQTT, AMQP, and HTTP protocols.

OPC UA pub/sub together with UDP is a solution that fits the needs of complex automation set-ups and can be integrated vertically across all OT layers and embedded systems. UDP creates a low amount of overhead as error checking and processing are not performed at the level of the network interface but can be executed in the application. Thus e.g. if a package is missing there is no delay due to waiting for a correction.
Hence the combination of OPC UA pub/sub and UDP is well suited for use in TSN networks and devices with constrained resources like sensor nodes and low-power processors (often found in the field level of an automation setup).

OPC UA Pub/Sub – Profiles

OPC UA pub/sub provides a framework that is capable of simultaneously supporting multiple protocols while providing a standard architecture for complex information. For example if a machine vendor uses  MQTT for communication with machines installed at a customer’s factory while the operator uses AMPQ to gather analytics the data sent to the cloud is based on OPC UA pub/sub in both cases. This dramatically reduces costs and provides great flexibility as operators can focus on the information instead on the protocols necessary to transport the data between systems.

One of the most important considerations when implementing OPC UA is to pick the right profile. Generally speaking the OPC UA profiles are collections of functionality that must be supported. For embedded UA servers the “Nano Embedded Device Server Profile”, “Micro Embedded Device Server Profile” and “Embedded UA Server Profile” are available.

Those embedded device server profiles greatly differ in terms of required flash and RAM memory as well as functionality. The nano profile requires the least amount of functionality and simply allows Read/Write access to the server’s data table and doesn’t require security. The micro profile further offers functionality for subscriptions, publishing data and more. The full embedded profile builds on the previous two with additional support for security via the Security Policy – Basic128Rsa15 Facet, and support for the Standard DataChange Subscription Server Facet. This Profile also requires that servers expose all OPC-UA types that are used by the Server including their components and their super-types.

While typical flash memory requirements for micro and nano profiles are in the area of sub-500kB, the Embedded UA Server Profile is intended for devices with more than 50 MBs of memory and a comparably powerful processor.

Application and Use Cases

Looking at the industrial IoT there are a number of scenarios in which a publisher subscriber model is preferable over a client/server architecture. These use cases can be categorized as large-scale communications from one to many, from many to one or from many to many.

The pub/sub extension enables public subscriptions for larger numbers of devices. The client/server model has drawbacks in this case as a large number of connections would have to be established, each client would need to provide memory for storing the connection information and high processor load would be generated in the server for encoding the individual messages per established connection.

Pub/sub further is essential for secure multicasting, many-to-one publishing, machine-to-machine communication, dynamic network relations and a number of additional scenarios. A typical example for a publisher is a sensor node which can publish sensed information easily and needs no control functions.

It is worth noting that the application of OPC UA pub/sub is not necessarily related to deterministic networking like TSN. However, there are several use cases where the combination of the specification with TSN is of great value.

The key take away of this article should be that OPC UA is a future-proven, versatile and flexible technology which enables robust machine-to-machine communication and the setup of reliable industrial automation networks. As OPC UA with the publisher/subscriber extension is adding additional benefits to the technology the implementation can be a real differentiator for companies and their competitiveness.

Get in touch with the experts of EBV for full support of your industrial projects and networking requirements here.

Leave a Reply

Your email address will not be published. Required fields are marked *