OPC DA / OPC HDA / OPC UA server dist

This section describes how to provide data via the WinCC OA OPC DA server, the WinCC OA OPC HDA server respectively the WinCC OA OPC UA server in distributed WinCC OA systems. With the help of CNS views the server can provide data from the local system as well as remote WinCC OA systems. OPC clients connected to the WinCC OA OPC server can retrieve the data of all systems.

Since the following information is valid for the OPC DA and the OPC HDA server, the term WinCC OA OPC server is generally used for both servers.

Configuration

To provide data in a distributed system you have to define the appropriate CNS views (refer to OPC DA server CNS, OPC HDA server CNS or OPC UA Server CNS) and link them to the OPC server. Therefor, you can assign a list of CNS views (of local or remote systems) to the server. The server uses this list of CNS views to create the address space. The views can be assigned either via Plantmodel Editor - OPC or directly via the corresponding data point element.

Use drag & drop to assign the CNS views from the list on the right side to the appropriate OPC server. Only views of systems which are currently connected are shown in this list. The list of assigned CNS views is mapped to the internal data point element _OPCPvssServer.Config.CNSViews (OPC / OPC HDA) / _OPCUAPvssServer.Config.CNSView (OPC UA). The current state of the CNS views is mapped to the internal data point element _OPCPvssServer.State.CNSViews (OPC / OPC HDA) / _OPCPUAvssServer.State.CNSViews (OPC UA) and is displayed by the following icons:

Icon Status Description
0 The state of the CNS view is not defined, since the OPC server is not running. If the server is not properly stopped (e.g. the server is stopped by the KILL command), the last status remains until the server is restarted.
1 The dist system is connected and the CNS view (all OPC elements of the view) are correctly mapped to the server's address space. The values of address space elements and data point elements are matching.
2 The dist system is connected and delta synchronization is running. Connected OPC clients can query data from the server.
3 The dist system is connected and full synchronization is running. This means that the entire CNS view is updated in address space. In this case all connected OPC clients receive the values last used by the server which are marked with OPC quality "uncertain, Last Useable Value".
4 The dist system is connected but the configured CNS view does not exist or cannot be found in the given system.
5 The dist system is not connected and the server has no information regarding the CNS views in the address space. As soon as the connection to the distributed system is established, the OPC server starts a full synchronization.
6

The dist system is not connected, the server knows DP identification and CNS views in address space. The OPC DA server marks all values of this view's system with OPC quality "Uncertain - Last Useable Value". In case of historical queries the OPC HDA server returns an error message.

If the connection to the system is established, the OPC server starts either a full or delta synchronization, depending on config entry maxUpdateMsgCouint and amount of changed data.

If the OPC server is started with useLocalIdentification, the address space is created with the information from the proj_path/data/DpMsgTypeContainer.bin and proj_path/data/DpMsgIdentification.bin files. In this case TypContainer and DpIdentification must not be sent via the network.

After startup, the server creates the appropriate address space. If you assign CNS views to the server at runtime, the server automatically updates the address space. Therefore, a server restart is not necessary. OPC clients connected to the server can retrieve data provided via the linked CNS views.

Synchronization

Changes to the CNS views of distributed systems (e.g. adding new nodes, changing linked data points) are automatically synchronized with the address space. There are two different types of synchronization.

Delta synchronization

During normal operation (which means all distributed systems are connected and WinCC OA servers are running) changes to the CNS views are synchronized with the address space on the fly. If the connection to the distributed system is lost, changes during this time up to the defined number of maxUpdateMsgCount are buffered and synchronized after the connection is reestablished.

Full synchronization

A full synchronization is necessary if at least one complete CNS view must be updated in the server's address space. The complete view is compared to the address space and differences are merged. This results in a load on the OPC server and may take a few minutes. During this time the OPC clients cannot receive values from the server.

This type of synchronisation is only necessary if there are any changes to the DP identification of a distributed system.

  • The connection to a distributed system is interrupted and there are more changes than the defined number of maxUpdateMsgCount
  • After project startup or restart of a remote system
  • After dist manager restart of a distributed system. In this case the DP identification needs to be synchronized between systems. If there are no differences no synchronization is necessary.

Redundancy

The WinCC OA DA server provides data of redundant systems. In case of an Disaster Recovery System, both redundant systems provide the same data. Therefore, the OPC clients must decide to which system's server the connection is established.

Connection failure

OPC Server general

  • If the OPC server is started before the connection to the distributed systems is established, the items of those systems are not mapped to the address space of the server. In this case the full synchronization is necessary when the systems are connected.
  • The config entry useLocalIdentification allows to create the address space by using the local buffer file even if the remote system is not connected at startup. The OPC server performs a delta synchronization after the connection is established. Therefore, the buffer file is only used at startup and is not needed after that.

OPC DA server

  • If the connection to a distributed system is lost, the OPC quality of all OPC elements located on this system is changed to "Uncertain - Last Usable Value". This indicates that the shown value is uncertain. The quality bits are automatically updated when the connection is reestablished.
  • If an item on an unavailable remote system is written, the write fails with an error code because the target cannot be reached. In this case the client has to write again when the system is available.

OPC HDA server

  • If the connection to a distributed system is lost, a historical query returns an error message.

OPC UA server

  • If the connection to a distributed system is lost, the OPC quality of all OPC elements located on this system is changed to "Uncertain - Last Usable Value". This indicates that the shown value is uncertain. The quality bits are automatically updated when the connection is reestablished.
  • If an item on an unavailable remote system is written, the write fails with an error code because the target cannot be reached. In this case the client has to write again when the system is available.
  • Only the alarms of your own system are supported when when using distributed systems.
  • If the connection to a distributed system is lost, a historical query returns an error message.