User Documentation

Table Of Contents
OPC UA Server
System manual
2696790000/02/04.2020
63
All OPC UA information (variables, data types, methods, etc.) is displayed as
nodes. Each node is assigned to a namespace. Namespaces and node IDs
allow a unique identification. You can define your own namespaces, object
and variable instances in the XML file. Methods, types (reference, object,
variable, data types) or views are not supported.
The information must be defined in exactly one XML file and this file must be
stored on the control in the directory /appldisk/application/OpcUa/. No
other XML files may be located in this directory. When the server is started
up, the XML file is read out and the defined information model is created.
Adaptations in the XML file only become effective after restart.
If the XML file contains errors (e.g. incorrect syntax, incorrect data type as-
signment), the OPC UA server does not start. Clients cannot connect any-
more. The cause of the error can be examined more closely in the System
Trace. See chapter 11.6 Logging of server operation.
Namespaces
A namespace is uniquely identified by its URI. This URI corresponds to a nu-
meric index assigned by the OPC UA server during startup. The namespace
"http://opcfoundation.org/UA/" (index = 0) is already specified by
the OPC UA standard and contains predefined data types and nodes for
OPC UA server diagnostics.
Namespaces are described within the XML tag <NamespaceUris>. Several
namespaces can be created there using <Uri>. The following attributes are
permissible:
Attribute Description
ns
This attribute is used to assign the numeric index of the namespace URI
used within the XML file. Only namespace 0, predefined by the OPC UA
standard, can be used without explicit XML configuration.
The numeric index is reassigned by the OPC UA server at runtime. This
index can be read out using the "NamespaceArray" object.
isDefaultNs
You can use this attribute to specify a namespace as the default value
within the configuration file. When describing instances, this namespace
no longer has to be specified explicitly in the definition of the NodeId.
Only one standard namespace can be used.
In the following example, two namespaces are created:
<NamespaceUris>
<Uri ns="1" isDefaultNs="1">www.company.com</Uri>
<Uri ns="2">MyNamespace</Uri>
</NamespaceUris>
Object and variable instances
To display variables or methods in the OPC UA client, instances must be
created and linked to the desired variables and methods on the control.