Data Exchange - OPC UA Server

For identifications of the items the OPC UA server can use either data point or data point element names or data point aliases. Using aliases the user can realize an addressing via OPC UA independent from the WinCC OA data point name. Whether data point names or aliases are used has to be defined by the config entry nodeIdType. It is not allowed to mix one type with the other, i.e. the server can only use either names or aliases.

Note: For detailed information see Access to WinCC OA Data.

It is recommended to start only one WinCC OA OPC UA server in a WinCC OA project, since the data point groups cannot be set for each server. In case that several WinCC OA OPC UA servers are started they would access the same data points.

Mapping of OPC UA <-> WinCC OA Attributes

There are two distinguishable points when mapping the WinCC OA structure to the OPC UA server process image. On the one hand the server needs the WinCC OA project structure to construct the name space and on the other hand the OPC UA server needs the data from the process image of the Event Manager.

The first data is listed in the table below. In order to keep the data on the server up-to-date the server reacts to changes of the project structure. That means that the server evaluates the corresponding WinCC OA messages.

OPC UA Name Data Type Comment Counterpart in WinCC OA
NodeId NodeId String Data point name or alias.
NodeClass NodeClass Number of NodeClass None.
BrowseName QualifiedName Node name Data point element name (not multi-lingual).
DisplayName LocalizedText Display text of the Nodes Data point element name (not multi-lingual).
Description LocalizedText Description

Description in the current language of the _common WinCC OA config.

If this does not exist, the DisplayName is used.

WinCC OA -> OPC UA Varaibles

The data from the process image of the WinCC OA Event Manager is mapped to OPC UA variables. The assignment between WinCC OA attributes and the OPC UA variable attributes is listed in the following table.

Name Data Type Comment Counterpart in WinCC OA
Value The real value

Online value (_online.._value).

If a value change is sent by the OPC UA client, the original value instead of the online value is set.

Timestamp WinCC OA attribute _online.._stime(source time).
Status

WinCC OA attribute _online.._status64.

The proper mapping of the WinCC OA status to OPC UA status is described in the "WinCC OA status mapping to OPC UA status" paragraph below.

DataType NodeId See mapping of data types.
ArraySize Int32 See mapping of data types.
AccessLevel Byte Is defined by the data point group. For data, which is readable only, the CurrentRead flag is set. For data, which is readable and writable, CurrentRead and CurrentWrite is set.
UserAccessLevel Byte The UserAccessLevel equals to the AccessLevel. That means the definition of the access rights takes place only via data point groups. All clients that are permitted to connect to the OPC UA server have the same access rights to the process image.

WinCC OA status mapping to OPC UA status

WinCC OA -> OPC UA

If at least one of the following status bits is set:

_out_prange

_out_range

_exp_inv

_auth_inv

_stime_inv

OpcUa_Bad
In all other cases OpcUa_Good

OPC UA -> WinCC OA

OpcUa_Good 0
OpcUa_BadXXX WinCC OA status bit auth_inv is set

Analog Item object

The Analog Item Object is currently not supported. Therefore, the OPC UA server does not support a relative deadband for monitored items.

Mapping of WinCC OA <-> OPC UA Data Types

The following table lists the WinCC OA data types that are supported by the WinCC OA OPC UA server. They also contain the assigned OPC UA type.

OPC UA Data Type WinCC OA Data Type
Boolean DPEL_BOOL
Int32 DPEL_INT
Int64 DPEL_LONG
UInt64 DPEL_BIT64
Byte DPEL_CHAR
UInt32 DPEL_UINT
UInt64 DPEL_ULONG
Double DPEL_FLOAT
String DPEL_STRING
DateTime DPEL_TIME
ByteString DPEL_BLOB
UInt32 DPEL_BIT32
NodeId DPEL_DPID
LocalizedText DPEL_LANGSTRING
Array of the basic type

DPEL_DYN_*

Note: * .. represents a basic data type
Restriction: dyn_blob elements are not supported.
Restriction: Only an array length of up to 65536 is supported.)
Note: The access to DPEs of type DPEL_DPID via OPC UA is limited, due to the fact that this type of DPEs only accepts existing DP Identifiers in WinCC OA.

Therefore it is not possible for the client to write a NodeId, which does not correspond to an existing DP Identifier. So these OPC UA variable nodes accept only NodeIds, which contains existing DP names.