OPC UA

OPC UA

Introduction

OPC UA (OPC Unified Architecture) is a highly adaptable communication protocol and architectural framework designed for industrial automation and control systems. Its purpose is to provide a standardized and interoperable approach for exchanging data among a wide range of devices and applications within industrial environments. OPC UA is renowned for its scalability, robust security measures, and exceptional flexibility, making it the optimal solution for seamlessly connecting devices, machines, and systems across diverse industries.

Within OPC UA, the cornerstone concept is the address space, which serves as a structured framework for organizing data and functionalities within an OPC UA server. This address space encompasses a variety of essential elements, such as objects, variables, methods, and other nodes that collectively define the available information and operations. Users can utilize OPC UA client applications or libraries to accomplish various tasks, including browsing the address space, reading or writing data, subscribing to data changes or events, and managing security settings.




Key Concepts and Terms

  • Host: The name or IP address of the machine where the OPC UA server is located. It is the network address used to establish a connection between the client and server.
  • Port: A specific endpoint on a host machine where a server listens for incoming network connections. OPC UA servers typically use specific ports to communicate with clients. The client needs to specify the correct port number to establish a connection.
  • Path: In the context of OPC UA, the path refers to the specific location or hierarchy within the server's address space. It helps identify the desired nodes or objects within the address space.
  • Security Policy: OPC UA supports various security policies that define the level of security applied to the communication between the client and server. Security policies include encryption, authentication, and integrity checks. Examples of OPC UA security policies are Basic128Rsa15, Basic256, and None.
  • Security Mode: The security mode determines the level of security used during communication between the client and server. OPC UA supports different security modes, including None, Sign, SignAndEncrypt. The security mode ensures data integrity and confidentiality based on the chosen policy.
  • User Name: A unique identifier used to authenticate a user when establishing a connection with an OPC UA server, often used in conjunction with a password.
  • Password: A secret code associated with a user name to authenticate a user when connecting to an OPC UA server. It ensures that only authorized users can access the server and its resources.
  • Connection Timeout: The maximum time the client waits for a connection to be established with the OPC UA server. If the connection is not established within the specified timeout duration, an error is typically returned.
  • Namespace Index: Used to uniquely identify namespaces within the OPC UA address space. Each namespace represents a distinct naming scope that organizes the nodes and objects within the OPC UA server.
  • Identifier Type: Specifies the format or scheme used for node identification in the OPC UA address space. Examples of identifier types in OPC UA include Numeric, String, Guid, and Opaque.
  • Identifier: The actual value used to identify a node within the OPC UA address space. The format and content of the identifier depend on the identifier type.



Connection Parameters

To establish a connection with an OPC UA server, the following parameters must be accurately entered:

Parameter

Description

Data Type

Host

The name or IP address of the OPC UA server machine

String

Port

The port number on which the OPC UA server listens

Int

Path

The specific location or hierarchy within the server's address space

String

Security Policy

The security policy for communication between client and server

String

Security Mode

The security mode for communication between client and server

String

UserName (Optional)

The username for authentication to the OPC UA server

String

Password (Optional)

The password for authentication to the OPC UA server

String

Connection Timeout

The maximum time to wait for a connection to be established

Int

Inputs

Once the connection with the OPC UA server has been established successfully, the "input" phase is used to define the data or dataset. This step involves specifying the relevant details pertaining to the data, such as its location, type, and structure.

Parameter

Description

Data Type

Namespace Index

Namespace index used to uniquely identify namespaces in OPC UA

Int

Identifier Type

Type of identifier used to identify nodes in the OPC UA address space

String

Identifier

Value used to identify a node in the OPC UA address space

String

Viewing and Importing Tags

The import page allows users to view all the tags available in the connection they have added. This feature enables users to easily add desired tags to the Input page. By expanding the relevant namespaces on the left side of the page, users can navigate to the location of the desired tag. The "+" symbol next to each tag allows for easy tag addition. Once added, the tags appear on the right side of the screen under "Imported Tags." Users can continue adding tags in this manner. After selecting the desired tags, they can be imported as inputs by clicking the "Import Selected" button located in the top-right corner. A confirmation message, "Input added successfully," will be displayed upon successful import. The imported tags can then be viewed on the Input page.









Outputs

To transfer the data package created by the user to an OPC UA server, it is necessary to define an output. This can be achieved by specifying the target node or object within the OPC UA address space where the data will be written. The user needs to provide the appropriate OPC UA method or operation to perform the write operation, such as "Write" or "CallMethod".

Parameter

Description

Data Type

Endpoint URL

Endpoint to send request to

String

HTTP Method

HTTP method to be used for the request

String

Header

Header key-value pairs to be added to the request

String

RequestTimeout

Request timeout duration in milliseconds

Int

Template

Template or pattern for the request URL or body (optional)

String

Before sending the data package, it is important to ensure that it conforms to the expected data format and structure of the target OPC UA node. This includes specifying the required attributes, data types, and any validation rules or constraints on the data. The user may need to map the data from the input format to the format expected by the target OPC UA node.

To verify the successful transfer of data, the user can check the response from the OPC UA server. This may include confirmation messages indicating that the data has been successfully written to the target node. It is important to handle any errors or exceptions that may occur during the data transfer process to ensure reliable and consistent data transfer.


    • Related Articles

    • AWS SiteWise

      AWS IoT SiteWise is an AWS service designed to efficiently collect, organize, and analyze industrial data. It enables users to structure and gather data from industrial devices, securely store it in the AWS Cloud, and gain valuable insights to ...