Common Name Service (CNS)

Plantmodel Editor

The plantmodel editor can be used for building and modifying data structures based on CNS. Therefore, views and trees can be created and used within the project easily. The editor can be started with the following button in the GEDI icon bar (at least permission bit 3 is necessary).

Figure 1. CNS Wizard Button

What is CNS?

CNS means Common Name Service and allows to map data points and data point elements to different views. These views contain trees in which the same data can be arranged in various ways in order to meet the various requirements of users or departments.

It is possible to assign every data point (element) to a node of a CNS tree. These trees are hierarchically structured which means that the nodes are starting from a root node.

A view allows to map one or more of this CNS trees. WinCC OA supports the use of an arbitrary number of views. The display names of views and nodes can be defined in multiple languages according to the current project.

CNS identifiers can be used for CTRL functions like dpGet, dpSet, dpConnect etc. However, they cannot be used for queries.

Figure 2. Example CNS Tree

Reasons for using CNS?

  • Different users or departments access data (data points), however different structures are needed

  • A grouping of several data points based on particular criteria is necessary without changing the existing data point structures

  • A fixed structure of data point types (e.g. because of a driver protocol which requires a defined structure like BacNet or IEC 61850) shall have a maximum flexibility for using within scripts and display through graphical objects.

  • In case of converting projects (e.g. from a third party SCADA) with flat data structures (e.g. Factory Link), it is easier to build an logical and flexible structure via CNS instead of reworking the whole data point structure or working with naming convention.

CNS Structure

The CNS has the following structures in WinCC OA:

  • The highest level of a node is the system. The system name of the WinCC OA project is used as a technical name for CNS.

  • A system can consist of an arbitrary number of views

  • A view can consist of an arbitrary number of trees

  • A tree is a hierarchical structure which starts with exactly one root node

  • An arbitrary number of child nodes can be added to each node. This results in the tree structure

  • Each node (or child node) can be linked to a data point (element)

CNS Addressing

Views and nodes can be addressed via their ID path. This path consists of the IDs of all parent elements, as well as the ID of the respective node. The display name cannot be used for addressing.
[<System>].<View>:[<RootNode>{.<Node>}]
Note: For views in local systems, the system name can also be omitted, z.B.: ".View1:Node1.Node2"
Nodes to which data points are assigned can be used to directly access a data point element, config or attribute of the data point. Such a path has the following format:
[<System>].<View>:<RootNode>{.<Node>}{.<DPE>}[:<config>[.<detail>[.<attribute>]]]

Addressing Examples

  • A view in the local system: .sites:
  • A view in another system: System2.Departments:
  • A root node: .Sites:Europe
  • Normal node: .Sites:Europe.Austria.Vienna.ProductionFacility_1
  • An attribute of a root DPE: .Sites:Europe.Austria.Vienna.ProductionFacility_1.:_online.._value
  • A normal DPE: .Sites:Europe.Austria.Vienna.ProductionFacility_1.MainSwitch.State:
  • An attribute of a normal DPE: .Sites:Europe.Austria.Vienna.ProductionFacility_1.MainSwitch.State:_online.._value

Common Name Service API

CNS API for developing is part of WinCC OA. The corresponding documentation can be found within the WinCC OA API documentation under <wincc_oa_path>/api/docu/. Open the index.htm file in order to show the entire API documentation.