Common Name Service (CNS)
The plantmodel editor can be used for building and modifying data structures such as views and trees based on CNS and use them within projects easily.
Plantmodel Editor
The editor can be started with the following button in the GEDI icon bar (at least permission bit 3 is necessary).
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. CNS identifiers can also be used for queries.
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
[<System>].<View>:[<RootNode>{.<Node>}]
".View1:Node1.Node2"
[<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
C++ CNS API 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.