Skip to main content

OPC PubSub

The fundamentals for applications which are based on the UADP protocol is the consistent transport of a data structure via UADP (i.e., OPC-coded frames via UDP/IP).

  • Because consistency must be maintained, the data structure must fit into a UDP frame (1500 bytes).

  • And because space is limited, transmission via UADP must be as efficient as possible.

  • Only RawData Field Encoding is supported. (This saves space.)

  • Only DataSetMessages of type Data Key Frame are supported. (Cyclical exchange of real-time data)

  • The structure – i.e., the sequence of values (DataSetField) and their types (DataSetMessage) – remains unchanged during operation and is agreed upon in advance between the publisher and the subscriber. (No metadata needs to be transferred during operation.)

_simitf_img_opcpubsub_header.png

The following table will help you to understand the parameters used:

_simitf_uadp_networkmessage_header_layout.png

The GroupVersion parameter is used by the Subscriber to check whether the received structure corresponds to the expected structure. A subscriber can use the SequenceNumber parameter to recognize whether messages have been lost.

The DataSetMessages parameters are structured as follows. The data structures of the publisher are coded 1:1 from IEC to OPC UA.

_simitf_datasetmessageheader.png

The parameters used are explained in the following table.

_simitf_uadp_datasetmessageheaderlayout.png

The DataSetMessage parameter, which consists of the DataSetMessage header and the individual DataSetFields data (= Data Key Frame), is inserted after the NetworkMessage header.

A DataSetField consists of a value of a basic data type:

_simitf_uadp_datafields.png

Part 14 of the OPC UA specification states:

The FieldCount parameter must be omitted if the RwaData Field Encoding option is set in the EncodingFlags flags of the DataSetMessage header (DataSetFlags1).

The FieldCount is therefore not encoded in the "Data Key Frame". This means that 1500 bytes - 15 bytes = 1485 bytes of user data are still available for the transport of a data structure via UADP.

Part 14 of the OPC UA specification states:

The FieldCount is ignored if the RawDate Encodings are set in the EncodingFlags of the DataSetMessage header (DataSetFalgs1).

The FieldCount is therefore not encoded in the data key frame. This means that 1500 bytes - 15 bytes = 1485 bytes of user data are still available for the transport of a data structure via UADP.

Figure 1. PubSub component overview
PubSub component overview