OPC UA PubSub: Configuring DataSet Fields and Metadata

Jason IP2 min read
OPC / OPC UAOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

The proposed OPC UA PubSub DataSet separates field metadata from values transmitted in DataSetMessages. The mapping is valid for describing a process-value field, but metadata properties such as Unit and Alarm do not automatically accompany every value update.

Map the process-value structure

Process-value member PubSub representation Transmission decision
PV name DataSet field name Describe it in FieldMetaData.
Data type and array shape BuiltInType, DataType, ValueRank, and ArrayDimensions Keep these in metadata.
Value Part of the field's DataValue Transmit it in DataSetMessages.
Server timestamp Part of DataValue Enable it through the DataSetFieldContentMask.
Quality StatusCode in DataValue Enable it through the DataSetFieldContentMask.
Unit Metadata property or independent DataSet field Create a field when it must arrive inline with value messages.
Alarm information Specific metadata property or independent DataSet field Use a precise meaning such as LevelAlarmMessage; create a field when it must arrive inline.
Stored-value size Not established by the evidence Define its required subscriber behavior before assigning a representation.

Why properties do not arrive with value changes

The Properties collection belongs to the field metadata. A subscriber that receives a changed value therefore should not be expected to receive Unit or alarm-related metadata in that same value update. This explains why the subscriber sees the new value but not the properties.

Delta frames can avoid repeatedly sending information that has not changed. Do not treat metadata properties as live payload fields merely because they are nested under the same FieldMetaData definition.

Configure fields according to update requirements

  1. Keep stable descriptors, including the field name, data type, array shape, and unit, in FieldMetaData when the subscriber only needs them as metadata.
  2. Configure DataSetFieldContentMask to include the required server timestamp and quality information carried by DataValue. Quality is represented by StatusCode.
  3. Replace the generic Alarm label with the exact alarm information being transported, such as LevelAlarmMessage.
  4. Create independent DataSet fields for unit or alarm information when the subscriber must receive those items inline whenever the primary value changes.
  5. Verify separately that the subscriber receives metadata, the changed value, every enabled DataValue component, and any new inline fields.

FAQ

Why does my OPC UA PubSub subscriber receive the value but not FieldMetaData properties?

Properties are reported as metadata rather than as fields in each value message. Define independent DataSet fields for properties that must accompany value updates.

How do I publish OPC UA server timestamps and quality with a DataSet field?

Include the server timestamp and quality through DataSetFieldContentMask. They are components of DataValue, with quality represented as StatusCode.

Should Unit and LevelAlarmMessage be separate OPC UA PubSub fields?

Yes, when the subscriber must receive them inline whenever the primary value changes. Otherwise, stable information such as the unit can remain in field metadata.

Back to blog