Internal data points of the OPC UA client

_OPCUA

A data point _OPCUA<num> of this type is used for several configuration settings for each OPC UA client. <num> stands for the manager number of the started client. By default, 3 data points of this type already exist: _OPCUA1, _OPCUA2 and _OPCUA3.

Data point element Type Description
Config.AlarmPrioMapping dyn_string

Defines the mapping of OPC UA severities to WinCC OA alert classes.

A mapping has the following format:

<OPC UA startSeverity1> <WinCC OA alertClass1>
<OPC UA startSeverity2> <WinCC OA alertClass2>
                                ...

An example of such a mapping is:

0 OPCUA_info
250 OPCUA_warning
500 OPCUA_alarm
1000 OPCUA_danger

I.e.:

  • If an alarm with a severity of 150 is received, this belongs to the WinCC OA alert class "OPCUA_info".
  • If an alarm with a severity of 499 is received, this belongs to the WinCC OA alert class "OPCUA_warning".
  • If an alarm with a severity of 500 is received, this belongs to the WinCC OA alert class "OPCUA_alarm".
  • If an alarm with a severity of 1000 (highest OPC UA severity) is received, this belongs to the WinCC OA alert class "OPCUA_danger".
Tip: For further information see Mapping of alarm data.
Config.Servers dyn_string Defines which servers are assigned to a client with the corresponding manager number. The appropriate OPC UA server data point must be inserted without the leading "_" character. If there is a periphery address for the server, the server data point is inserted automatically.
Config.HistoryReadResponseDps dyn_string The response data points must be registered on this data point element in order to write historical data to them. See also _OPCUAHistoryReadResponse.
Command.AddServer string Can be used for assigning an OPC UA server to a client dynamically (without using the server config entry and a resulting restart). Therefore, the OPC UA server data point must be inserted. The server can thus be added dynamically without creating a peripheral address.

_OPCUAHistoryReadResponse

If a data point of this type is created and entered at _OPCUA.Config.HistoryReadResponseDps, data of historical requests can be mapped onto it. The elements of this type are described in the following table.

Data point element Type Description
RequestId string Shows the ReguestId used for triggering the history read request. This element can be used to associate the result of a request with the specific request.
ReturnCode int

The return code for the triggered history read request. The following values are possible:

  • 0 - The specified parameters for the history read request were valid and the service request was sent to the server.

  • -1 - No RequestID or no connection to the server, no history read request was sent to the server

  • -2 - Unknown Function, no history read request was sent to the server

  • -3 - Unknown Method, no history read request was sent to the server

  • -4 - No matching peripheral addresses found, no history read request was sent to the server

DpList dyn_string In case that a peripheral address wildcard was defined in the parameters, this DPE contains a list of the appropriate data point elements where the corresponding peripheral addresses are configured (only when using method 3).
ResultCodes dyn_int

The result codes for the history read request. If a peripheral address wildcard was defined in the parameters then this DPE contains a list of result codes for the appropriate data point elements.

The following values are possible:

  • 0 - The OPC UA server returned the status code “Good” for the history read request

  • -1 - The OPC UA server returned the status code “Bad” or “Uncertain” for the history read request

  • -2 - The parameters for the history read request are invalid and no request was sent to the OPC UA server

NodeStatusCodes dyn_bit32 The OPC UA node status code from the history read request. If a peripheral address wildcard was defined in the parameters then this DPE will contain a list of OPC UA node status codes for the appropriate server nodes.
DataType string

The data type of the variable for which a history read request was triggered.

This DPE is only set if either method NodeId or BrowsePath was defined in the parameters.

DataValues dyn_string

The historical values returned for the read request.

This DPE is only set if either method NodeId or BrowsePath was defined in the parameters.

SourceTimestamps dyn_time

The source timestamps in local time returned for the history read request.

This DPE is only set if either method NodeId or BrowsePath was defined in the parameters.

ServerTimestamps dyn_time

The server timestamps in local time returned for the history read request.

This DPE is only set if either method NodeId or BrowsePath was defined in the parameters.

ValueStatusCodes dyn_bit32

The OPC UA value status codes returned for the history read request.

This DPE is only set if either method NodeId or BrowsePath was defined in the parameters.

_OPCUAServer

A data point of this type contains the configuration and status information of an OPC UA server to which the client connects to.

The connection and security settings will not be applied until the server has been restarted. This means that the connection is not automatically terminated and established with the new parameters.

The elements of this type are described in the following table.

Data point element Type Description
Config.ConnInfo string

Specifies the server URL. This defines how the server can be reached. An example for the format is:

opc.tcp://localhost:4841

Config.AccessInfo string Contains the user name for the access to the server. If the data point element is empty, the client logs in anonymously.
Config.Flags bit32

Each bit (0-based counting) allows additional settings for the OPC UA Client.

bit 3

Setting the bit (=1) will delay the creation of subscriptions within the client until the server returns the state "Running".

Warning: Please make sure, that the server supports the state "Running", otherwise no subscriptions will be created.
bit 8

Setting the bit (=1) allows the client to communicate with OPC UA server that do not support secure communication.

CAUTION: The setting must only be used if your plant provides a secure environment as it will lead to unencrypted transmissions of passwords between client and server.
bit 9

Setting the bit (=1) allows the client to communicate with an OPC UA server that does not provide a valid certificate.

CAUTION: This setting must only be used if the server cannot be updated with a valid certificate!
Config.Password blob

Contains the password for the access to the server. The password is displayed encoded.

Remember: If the password on the server was changed, the changes also have to be updated on the client in order to decode the password correctly.
Config.Security.Policy uint

The following security policies are possible:

  • None (0)

  • Basic128Rsa15 (2)

  • Basic256 (3)

  • Basic256Sha256 (4)

  • Aes128Sha256RsaOaep (5)

  • Aes256Sha256RsaPss (6)

Config.Security.MessageMode uint

The following message concepts are possible:

  • None (0)

  • Sign (1)

  • Sign&Encrypt (2)

Config.Security.Certificate string

Certificate which should be used by the client for connection establishment (example: myCertificate.der).

If this field is empty, the client uses "WinCC_OA_UA_Client.der".

Config.Active bool With this data point element the communication to the corresponding server can be deactivated (FALSE) and activated (TRUE).
Config.ReconnectTimer uint Time interval in seconds the driver tries to establish a connection to the server, if no connection is available.
Config.StatusMapping dyn_string

Specifies the mapping of the OPC UA status codes to WinCC OA user bits.

The mapping is specified in a dyn_string. The dyn_string contains entries in the following form:

<UA status code><space><user bit number>

Whereas one user bit on the right side can be used multiple times:

For example:

0x00000000 1
0x80280000 2
0x80300000 2
2150891520 32
Config.StatusFilter dyn_uint

Allows defining OPC UA status filters for incoming data values. This means that values from the OPC UA server are filtered and discarded based on the UPC UA status.

It is possible to specify several status filters.

Config.Separator string Separator for the view of the display names.
Config.Subscriptions dyn_dpid

A subscription is always uniquely assigned to a server. A server can have multiple subscriptions. In this internal data point element the corresponding subscriptions are stored in the format:

<systemName>:_<subscriptionName>
Config.HistoryReadTimestamps uint

Defines which timestamp is applied when using method 3 (writing historical data to _archive config of the appropriate data point element). The following values can be set:

  • 0 (default) - Timestamp of the subscription of the appropriate data point element. If no subscription is defined the source timestamp is used.

  • 1 - Timestamp of the subscription of the appropriate data point element. If no subscription is defined the server timestamp is used.

State.ConnState uint

Indicates the connection status to the server:

  • Not connected (0)

  • Connected (1)

State.ServerState string Displays the server status. The usual state is "Running" which means that everything is OK. Otherwise an error status is indicated.
State.StartTime time Displays the startup time of the server.

Format:

JJJJ.MM.TT HH:MM:SS:MMM
State.TimeoutError int

Contains information of timeout errors. Possible values:

  • 0 - no error
  • 1 - error during read (actually not used)
  • 2 - error during write
State.TimeoutItems string Lists all items for which the operation fails and a timeout error occurs.
State.VendorInfo string Displays the vendor information of the server.
Command.GQ uint

Triggers a general query on the server. The specified value indicates whether values, alarms or both are queried:

  • values and alarms (0)

  • values only (1)

  • alarms only (2)

Command.HistoryRead dyn_string

Historical read requests are triggered via this element. The following parameters must be specified.

Index Range Description
1 -

RequestID

Allows you to define a unique ID in order to match the result of a request to a specific request.

2 -

Function

Currently only the function ReadRaw is supported.

3 1|2|3

Method

Defines the method of the request / processing of the received data. The following methods are possible:

  • 1: NodeId

  • 2: BrowsePath

  • 3: Peripheral adress (wildcards are supported)

4 -

Variable

Depending on the used method, either the node ID, browse path or peripheral address must be specified here.

Note: History read requests are not possible for all nodes (see also notes and restrictions).
5 -

startTime

Defines the start time for the read request. The following format must be used:

YYYY-MM-DD HH:MM:SS

The given time is the local time. The OPC UA client converts this time to UTC internally and transmits the historical request with this UTC time.

In case that no start time shall be used, an empty string must be specified.

6 -

endTime

Defines the end time for the read request. The following format must be used:

YYYY-MM-DD HH:MM:SS

The given time is the local time. The OPC UA client converts this time to UTC internally and transmits the historical request with this UTC time.

If an end time is not used, an empty string must be specified.

7 >=0

maxNumValuesPerNode

Defines the maximum number of values returned for the defined time range.

8 0|1

returnBounds

Defines whether limit values ​​should be returned.

9 -

DP name

The name of the data point onto which the result of the read request shall be mapped. The specified data point must be of type _OPCUAHistoryReadResponse and entered at _OPCUA.Config.HistoryReadResponseDps

Important: At least two of the parameters startTime, endTime und maxNumValuesPerNode must be set!
Note:

There are the following special use cases:

  • startTime and maxNumValuesPerNode are set: The defined number of values is returned starting from the given start time.

  • endTime and maxNumValuesPerNode are set: The defined number of values is returned backwards starting from the given end time.

    Example:

    endTime = 2015-03-03 09:20:00
    maxNumValuesPerNode = 3

    Result:

    2015.03.03 09:19:50.000
    2015.03.03 09:18:50.000
    2015.03.03 09:17:50.000
  • endTime < startTime: In this case the values are also returned in reverse order.

Redu.Config.ConnInfo string

Specifies the server URL of the redundant server. This defines how to connect the OPC UA server. An example of the format is:

opc.tcp://localhost:4841

Redu.Config.Active bool With this data point element the communication to the redundant server can be switched off (FALSE) and switched on (TRUE).
Redu.Config.HistoryReadMode uint

Defines the behavior for historical requests in case of redundant OPC UA servers. The following values are possible:

  • 0 - The HistoryRead request is sent to the first accessible server. This is the default behavior if a connection to an OPC UA server is configured.

  • 1 - The HistoryRead request is sent to both redundant servers. The result of these two service requests is merged. For merging the historical data values the source timestamps are used. If the server does not provide source timestamps, the server timestamps of the history read results will be used.

Redu.Config.InputMode uint

Defines the input data source within a redundant server pair.

The allowed values are:

  • 0 - take input data from both server (as it is up to now)
  • 1 - take input data only form server 1
  • 2 - take input data only from server 2
  • 3 - take the input data from the server with higher service level

If a server is explicitly selected than the client does not use values of the other server, even if the connection to the selected server fails. In that case the application has to switch manually to the other server.

The option only affects input data. In any case, output values ​​are written to both servers.

Redu.State.ConnState uint

Indicates the connection status to the redundant server.

  • not connected (0)

  • connected (1)

Redu.State.ServerState string Indicates the server status of the redundant server (Good or Bad).
Redu.State.StartTime time

Indicates the start time of the redundant server. Format:

JJJJ.MM.TT HH:MM:SS:MMM

Redu.State.TimeoutError int

Contains information of timeout errors. Possible values:

  • 0 ... no error
  • 1 ... error during read (actually not used)
  • 2 ... error during write
Redu.State.TimeoutItems string Lists all items for which the operation fails and a timeout error occurs.
Redu.State.VendorInfo string Indicates the vendor name of the redundant server.
Browse.GetBranch dyn_string With the aid of this data point element browsing is triggered. The following is saved:
  • Id - Id of the requests (assigned by the UI, used to match a reply with the request.)
  • ServerName | S1
  • StartNode | ns=1;s=SYSTEM
  • Level | 0 (recursive), >0 (number of levels downwards)
Browse.GetAlarmTypes dyn_string

Alarm type browsing is triggered via this datapoint element. The dyn_string contains only the ID from the UI (see Browse.GetBranch).

The function corresponds to Browse.GetBranchbut . ConditionType is always used as the start node, any number of levels down are used, and only nodes representing alarm types are returned.

Browse.RequestId string The client writes to this datapoint element the ID from . Browse.GetBranch or Browse.GetAlarmTypes, to be able to tell the user which request is being answered if there are multiple concurrent users.
Browse.DisplayNames dyn_string

View of the names up from the start node. The levels are separated with a separator that was defined in the server data point.

For example:

Folder?stringArray
Browse.BrowsePaths dyn_string

View of the whole browsing path in the defined notation beginning at the node /0:Objects:

/1:AGENT/1:Objects/1:pUInt32
Note: Special characters as / . < > : # ! & are disguised by &.
Browse.NodeIds dyn_string

View of each NodeId per browsed node in the defined notation:

ns=1;s=AGENT.Objects.pUInt32

Browse.NodeClasses dyn_string

View of each NodeClass per browsed node:

  • OpcUa_NodeClass_Unspecified

  • OpcUa_NodeClass_Object

  • OpcUa_NodeClass_Variable

  • OpcUa_NodeClass_Method

  • OpcUa_NodeClass_ObjectType

  • OpcUa_NodeClass_VariableType

  • OpcUa_NodeClass_ReferenceType

  • OpcUa_NodeClass_DataType

  • OpcUa_NodeClass_View

Browse.DataTypes dyn_string View of the data type.
Browse.ValueRanks dyn_string View of the value rank.
Browse.AccessLevel dyn_bit32

A bit mask indicating whether the current value of the Value Attribute is readable and writeable as well as whether the history of the value is readable and writeable.

Field Bit Description
CurrentRead 0

Indicates if the current value is readable

CurrentWrite 1 Indicates if the current value is writable.
HistoryRead 2 Indicates if the history of the value is readable.
HistoryWrite 3 Indicates if the history of the value is writable.
SemanticChange 4 Indicates if the Variable used as property generates SemanticChangeEvents.
Reserved 5-7 Reserved for future use. Shall always be zero.

_OPCUASubscription

This data point type provides the configuration of subscriptions and the indication of their status. There are some subscription parameters, which can be configured but might be overwritten by the server. For these parameters there is a data point element for configuration (Requested) and one which displays the actual value (Revised*).

Data point element Type Default-Werte Description
Config.RequestedLifetimeCount uint 100 Number of publishing intervals until the subscription is deleted by the server, if no publish request has been received.
Config.RequestedMaxKeepAliveCount uint 10 When the publishing timer in the server has expired this number of times without data to be sent, the subscription sends a keep-alive Message to the Client.
Config.RequestedPublishingInterval uint 500 In these intervals in seconds the values are read from the server's queues by the client. The intervals are set in milliseconds.
Config.MaxNotificationsPerPublish uint 0

This DPE can be used to specify a limit for notifications the server shall send as response to a Publish request. It can be used to reduce peaks of communication load, when buffered data are transmitted.

The value 0 means that the client does not specify a limit and the server will use the maximum number of notifications per publish.

The maximum values are server dependent, e.g. the WinCC OA OPC UA server has a maximum value of 65535

Config.PublishingEnabled bool FALSE Activates (TRUE) and deactivates (FALSE) a subscription ((no) reaction on value changes).
Config.Priority uint 0

This value indicates with which priority the notifications of this subscription are sent by the server.

Value range: 0 - 255;

whereby 0 means no special priority and 255 the highest priority.

Config.SubscriptionType uint 1

Defines whether this is a subscription on :

  • Data (1)

  • Events (2)

  • Alarms & Conditions (3)

  • undefined (0) - not selectable in the panel

Config.MonitoredItems.TimestampsToReturn uint 3

Indicates which timestamp of the node should be used.

In WinCC OA the corresponding availability is defined by:

  • Source (0)

  • Server (1)

  • Reserved (2)

  • None (3) - OPC UA client passes timestamp.

Config.MonitoredItems.QueueSize uint 1 Number of value changes of the items, which will be stored until the next publish.
Config.MonitoredItems.DiscardOldest bool TRUE Defines whether the oldest elements (TRUE - default) or the youngest elements (FALSE) are discarded from the queue, if the queue overflows.
Config.MonitoredItems.SamplingInterval uint 0 Interval the server uses for querying the monitored items from the underlaying system in milliseconds.
Config.MonitoredItems.DataChangeFilter.Trigger uint 1

Defines the trigger to which the filter applies:

  • Status (0)

  • Status, Value (1)

  • Status, Value, Timestamp (2)

Config.MonitoredItems.DataChangeFilter.DeadbandType uint 0

Defines the deadband type for value calculation:

  • none (0)

  • absolute (1)

  • percent (2)

Config.MonitoredItems.DataChangeFilter.DeadbandValue uint 0 Value in whose range from the original value up the deadband is valid.
Config.Alarm.Acknowledgment dyn_string - Not used.
Config.Alarm.AlarmType string - OPC UA alarm type node ID.
State.AssignedOPCUAServer string - Name of the OPC UA server to which the subscription is assigned.
State.SubscriptionId uint -

Internal identification number for every subscription. This is unique for each server.

  • 0 = invalid
State.RevisedLifetimeCount uint - Returned LifeTimeCount.
State.RevisedMaxKeepAliveCount uint -

Returned MaxKeepAliveCount.

  • 0 = invalid
State.RevisedPublishingInterval uint -

Returned publishing interval in milliseconds.

  • 0 = invalid
Command.GQ uint 0

Trigger for the general query per subscription. This is triggered independent of the value.

Since a subscription can be either for values ​​or alarms, the value passed is irrelevant.