Address Space & Namespace in OPCUA
In OPC UA (OPC Unified Architecture), the concepts of "Address Space" and "Namespace" are fundamental to understanding how data is organized and accessed within an OPC UA server.
Address Space in OPC UA
The Address Space in OPC UA is a structured collection of all data points (nodes) that an OPC UA server makes available to clients. It's like a database containing all the information that the server can provide, including real-time data, historical data, alarms, and other information.
Nodes and NodeIds:
The Address Space consists of elements called "nodes". Each node represents a piece of data or a function. Nodes can represent variables (data points), devices, processes, methods (functions), and more. Every node in the Address Space is uniquely identified by a NodeId.
Types of Nodes: There are different types of nodes, including:
- Variable Nodes: Represent variables or data points.
- Object Nodes: Represent objects or instances in the system.
- Method Nodes: Define executable functions.
- DataType Nodes: Describe the data type of a node.
- Reference Nodes: Define relationships between other nodes.
Hierarchical Structure:
The Address Space is organized hierarchically, allowing for a structured and logical representation of information. This hierarchy is established through references between nodes.
Namespace in OPC UA
Namespace in OPC UA is used to ensure the uniqueness of identifiers across different systems. Given that OPC UA is a standard used by various organizations and systems, the Namespace concept avoids conflicts in identifiers.
Namespace URI
Each Namespace is identified by a URI (Uniform Resource Identifier). A Namespace URI is a unique identifier that distinguishes the set of names used by one server from another. For example, a company might use its domain name in the Namespace URI.
Namespace Index
Each Namespace is also assigned an index number, known as the Namespace Index, used in NodeIds to indicate which Namespace the identifier belongs to. This index is a numerical shorthand for the Namespace URI.
Practical Application
When a client wants to access data from an OPC UA server, it refers to the NodeId, which includes the Namespace Index to ensure it's accessing the correct data point.
This organization allows OPC UA to be highly scalable and interoperable, accommodating a wide range of industrial applications.
Understanding the Address Space and Namespace is key to working effectively with OPC UA, as it forms the basis of how data is structured, identified, and accessed in the OPC UA environment.