OPC UA PubSub

Available from firmware 2022.0 LTS on all PLCnext Control devices
Configurable in PLCnext Engineer from software release 2022.0 LTS

Starting with firmware 2022.0 LTS, the PLCnext Technology firmware has an implementation of the OPC UA® Publish and Subscribe specification (PubSub) as a new communication protocol. This enables the data exchange in a network via UDP (User Datagram Protocol). The data exchange is possible between the same or different types of PLCnext Control devices, as well as with devices of other manufacturers that support OPC UA® PubSub. OPC UA® PubSub enables data sharing between devices and applications.

The OPC UA® PubSub feature in general does not depend on the regular OPC UA® server/client operation.

For further information you can also refer to the OPC UA PubSub specification

For information on the configuration steps as well as explanations of terms (for example, data set or WriterGroup/ReaderGroup), refer to the online help of PLCnext Engineer.

Note: If you use switches in your network and plan to use the OPC UA® PubSub feature, make sure that the switches support IGMP (Internet Group Management Protocol). 
IGMP is a communication protocol of the TCP/IP protocol family. It is necessary for the organization of multicast receiver groups in IPv4 networks. IGMP enables a publisher to send data streams to entire groups of recipients in a targeted manner, making optimal use of transport and routing capacities.
Publisher

You can configure a controller as a publisher by creating different WriterGroups that send a defined set of data in a defined publishing interval (for example, 1000 ms) to the network. The data sets to be published to the network must consist of OUT ports or resource-global variables. Currently, only elementary data types or one-dimensional arrays of an elementary type are supported for publishing.

Subscriber

You can configure one or more other controllers as subscribers. For this purpose, you have to create ReaderGroups in the project configuration that can subscribe for the data provided by the publisher. These ReaderGroups on the subscriber side have to mirror the WriterGroups' structure on the publisher side. A subscriber can receive data from IN ports and resource-global variables. Currently, only elementary data types or one-dimensional arrays of an elementary type are supported for subscribing.

Facets

The PLCnext implementation of OPC UA PubSub includes the following profiles and facets:

From firmware version 2022.6:

Note: Signing and encryption are not supported yet.

Enabling the OPC UA® PubSub service

The OPC UA® PubSub service is disabled on the controller by default. To use the feature, you must enable it via the WBM page System Services. Note that you have to activate the OPC UA (Service ID: OPCUA; Service Name: OPC UA® Server) as well as the OPC UA PubSub (Service ID: OPCUA PUBSUB; Service Name: OPC UA® PubSub) service.

Licensing

In addition to enabling, the unlimited use of the OPC UA® PubSub feature requires a license. Without a license, the feature is initially available for a 4-hours trial period after booting the firmware. For further use of the feature, you must purchase an OPC UA PubSub License via the PLCnext Store. How to purchase and install the license, is described in the PLCnext Store ‑ Info Center.

Configuration of OPC UA PubSub

Note: Make sure that the order of the ports and variables as well as the data types of a subscriber's ReaderGroup exactly matches the order of ports and variables and the data types of a WriterGroup provided by the Publisher. Currently, there is no automatism or control mechanism that supports the configuration and draws attention to possible mapping errors. This is because you have to configure the publisher and subscribers in different PLCnext Engineer projects. In the worst case, an incorrect configuration can lead to data inconsistencies that are not detected.

You can configure the OPC UA® PubSub feature via the PLCnext Engineer software as of version 2022.0 LTS or newer.

  • To access the configuration page, open OPC UA in the PLCnext Engineer PLANT tree.

The OPC UA / OPC UA Server configuration page opens in the Editor's area.

  • Open the tab OPC UA PubSub to start the configuration.

Screenshot up to version 2024.0 LTS of PLCnext EngineerScreenshot up to version 2024.0 LTS of PLCnext Engineer

Note: In general, multicast addresses (IPv4) have to be in the range of 224.0.0.0 to 239.255.255.255. Multicast is a feature of involved Ethernet devices (including switches and routers placed between publisher and subscriber). Therefore the related devices have to support this feature, too. Some switches may require an additional configuration. Each involved switch maintains internal tables how to forward multicast datagrams effectively. Therefore, some addresses must not be used:
  • 224.000.000.001
  • 224.000.000.002
  • 224.000.000.022
Furthermore many switches optionally use IGMP (Internet Group Management Protocol) snooping to further optimize their internal tables for forwarding multicast datagrams and to reduce overall network traffic. Typically the following addresses may cause additional effort for these switches and should not be used:
  • 224-239.000.000.*
  • 224-239.128.128.*

For more information on the configuration steps, refer to the online help of PLCnext Engineer.

OPC UA PubSub limitations

The PubSub component and its quantity structure is limited.
The following values apply for the PLCnext Technology implementation:

  • Maximum network message size for all variable values of a ReaderGroup or WriterGroup: 1472 Bytes
  • Maximum number of connections: 4
  • Maximum number of WriterGroups: 8
  • Maximum number of ReaderGroups: 8
  • Maximum number of Writers: 32
  • Maximum number of Readers: 32
  • Maximum number of datasets: 32
  • Minimum publishing interval: 20 ms

 


• Published/reviewed: 2024-12-10  ☃  Revision 075 •