OPC-UA Client Plug-in
Quickstart Tab
The Quickstart tab allows for a quick and straightforward configuration of the basic connection parameters required to connect to an OPC-UA server. The key fields include:
- Name: A user-defined identifier for the connection, such as "KepServer" or "Aveva".
- Endpoint: The server endpoint URL (e.g.,
opc.tcp://aveva:48033
oropc.tcp://KepServer002.mshome.net:49320
, or an IP address). This field defines where the client should connect.
Note: If encryption is used, the endpoint must be specified exactly as it is stored in the server's certificate. For example, if the certificate contains "Server.domain.local", the endpoint must also be addressed in this way, and not, for example, via the IP. Otherwise, the certificate will be rejected by the OPC server.
- Accesspath: An optional field to specify an access path for the connection.
Important: When specifying an Access Path, only data points in the selected folder are displayed in the Tag Browser. You can use the button next to the Access Path to open the Tag Browser and select the folder. The Access Path can only be set if the "Browse Path" function is used for item identification.
- Timeout (ms): Specifies the connection timeout in milliseconds. For example,
15000
ms allows the client 15 seconds to establish a connection. - Highest Security Level: An option to enforce the highest level of security, ensuring that the connection is secured with the best available methods.
- Authentication: The type of user authentication used. The options are "Anonymous", "Username", or "Certificate".
Click Test Connection to verify the connection parameters before proceeding.
Connection Tab
The Connection tab provides additional details about how the client connects to the server. This includes specifying advanced connection paths or additional configuration details that may not be covered in the Quickstart tab.
Security Tab
The Security tab helps ensure the integrity and safety of the connection by defining and validating trusted certificates:
- Trusted Certificates: Specifies which certificates are trusted. You can import trusted (root) or trusted certificates in the OPC Router settings, or use the Windows/System certificate store to import the Root/Server certificate.
- Certificate Validation: Ensures that certificates are verified to add an extra layer of security.
- Validate Server Application URI: Validates the server's application URI to ensure correct identity verification.
- Highest Security Level: This checkbox ensures that the connection uses the best available security measures.
- Client Certificate: Select or create a certificate for the OPC Router to identify itself against the server. If you want to import an existing certificate, you can do this in the OPC Router settings under the Certificate section.
- Use the plus sign to add a new certificate, and the minus sign to remove one. Another button allows you to display the properties of an existing certificate.
Redundancy Tab
Note: If you want to use the function to read data from a redundancy server, you need the Enterprise license.
The Redundancy tab allows you to configure redundancy settings to ensure a continuous connection:
- Redundant Server: The OPC Router can connect to redundant OPC UA servers. This involves specifying an additional server. It is assumed that the node structure and authentication are identical on both servers.
- Endpoint and Heartbeat Item: Define the redundant server endpoint and specify a heartbeat item to determine which of the servers is active. If this item has a BadQuality or False value, the other server is assumed to be active.
- Activate Redundancy: Activate redundancy settings if the primary server cannot be reached, or if the heartbeat item indicates an issue.
- Use the Check connection button to verify data connections in advance.
Subscription Tab
The Subscription tab contains settings that define the behavior of subscriptions:
- Keep Alive Count and Retry: Specifies how often the server should send keep-alive messages and the number of retries before disconnection.
- Lifetime Count: Defines how long a subscription remains active without receiving updates.
- Priority: Sets the priority level of the subscription.
- Subscription Publish Interval: Sets the interval at which the server publishes data changes.
- Subscription Minimum Lifetime Interval: Sets the minimum subscription lifetime interval.
- Register OPC Tags on Start: Automatically registers OPC tags at startup.
- Enable Parallel Subscription Registration: Enables more efficient subscription handling.
Browse Tab
The Browse tab configures how the client interacts with the server's address space:
- Continue Browse Until Done: Ensures that browsing continues until all nodes are retrieved.
- Disable Browse Has Children: Disables additional checks for nodes with children.
- Max Browse Continuation Points Override: Sets the maximum continuation points for browsing.
- Max Browse References Returned: Limits the number of references returned per browse operation.
- Max Nodes Per Browse Override: Sets the maximum number of nodes per browse operation.
- Max Nodes Per Translate Browse Path Override: Limits the number of nodes for translating browse paths.
Read Tab
The Read tab is used to configure the behavior for reading data:
- Max Nodes Per Read Override: Sets the maximum number of nodes per read request.
- Read Cycle Warning Threshold: Defines the threshold for triggering a read cycle warning.
- Read Max Age: Sets the maximum age for read values.
- Parallel Read/Write Activation: Enables simultaneous read and write operations, improving performance.
- Transfer OPC null values: If enabled, invalid OPC values will also be transferred (e.g., as NULL into databases).
Write Tab
The Write tab focuses on configuring data writing behavior:
- Array Handling: Specifies how arrays should be handled when writing data. Options include:
- Pass Original Array: Send the incomplete, raw array exactly as it is.
- Fill Missing Values with Last Used: Use the value of the most recent value for all missing elements.
- Fill Missing Values with Default: The default value will be used for missing elements (e.g., NULL for INT).
- Max Nodes Per Write Override: Sets the maximum nodes allowed per write operation.
- Max Batched Writes: Controls the number of writes that can be batched together for efficiency.
- Asynchronous and Grouped Writes: Enables asynchronous and grouped writes to optimize data transfer.
- Publish on Write Activation: Immediately publishes data when written.
- Parallel Read/Write Activation: Allows for simultaneous read and write operations.
Advanced Tab
The Advanced tab provides additional settings for experienced users who want to fine-tune the connection:
- Timeout and Sample Rate: Set timeouts and data sampling rates to control the connection.
- Sample Rate: Defines the rate (in ms) at which the OPC server refreshes values. Setting "0" will use the smallest available update rate.
- Allowed Qualities of Values: If the quality of the values does not match the selected quality, this will result in a transfer abort in the OPC Router at runtime with an appropriate error message. For example, if "Bad" is allowed, a "" value may be transferred, which can lead to subsequent errors if this value is not valid for the target.
- Addressing Method: It is recommended to use "Browse Path" instead of Node ID for addressing. According to the OPC UA specification, it is not mandatory that the Node ID remains persistent between server restarts or reconfigurations. By using Browse Paths, the OPC Router resolves this during startup or when the connection is established (which may be slightly slower initially).
Note: The Browse Path option may be more beneficial when used with templates, although it may increase initialization time, especially in larger projects.
- Access Optimization: Enable RegisterNode access for improved performance. This setting registers the nodes and then uses handles from the register for subsequent communication. This reduces the payload size and optimizes the overall communication since the complete NodeId (which can be a long string for some servers) does not need to be transmitted each time.
- Keep Alive Timeout Override: Override settings for keep-alive messages.
- Preferred Culture: Set the preferred language or culture for communication.
- Provider Implementation: Select the OPC UA version for data type definitions. Options include "OPC 1.03 Data Type Dictionary" or "OPC 1.04 Data Type Definition".
- Enable Local Process Communication: This setting is used only when accessing the same OPC Router that also acts as the UA Server. In this case, the TCP/IP stack is bypassed, and the client communicates directly in-process with the UA Server, which can improve performance.
OPC Read Mode
The OPC Read Mode setting provides three different modes for reading data from the OPC server:
- OPC Router Cache: In this mode, the OPC Router itself is responsible for reading the data points. Data points are read at the configured "Sample Rate" and held in an internal cache. The reading process is handled by internally created groups or subscriptions, and an internal thread reads items using a DeviceRead operation from the OPC server. The "Read Time" in the OPC Router status for the transfer object reflects access to the internal OPC Router cache, not the OPC server itself. If the background update takes longer than the configured sample rate, the log file may display "Workcycle took longer than...".
- Asynchronous (Recommended): In this mode, OPC ChangeNotifications are used, meaning the OPC server is responsible for reading the data points and notifying the OPC Router of changes. The OPC Router stores the values in its internal cache and provides them to transfer objects. The read times in the transfer object's status reflect access to the internal cache only. This setting can be combined with the Subscription Publish Interval and Max Notifications per Publish to receive "fast batched" value changes for the DataChange trigger.
- Synchronous: In this mode, a "Sync read from Device" is performed directly from the context of the OPC transfer object, bypassing all caches. The times in the transfer object's status reflect the actual access to the device.
Background Information from OPC UA Specifications
The OPC Unified Architecture (OPC UA) is designed as a platform-independent standard to facilitate communication between various systems and devices across all industrial domains. It allows seamless interoperability through standard models for data exchange and interaction, supporting both Client-Server and Publish-Subscribe (PubSub) communication models.
AddressSpace Model: The OPC UA AddressSpace is a core concept that defines how information is structured and accessed within a server. It is an organized collection of Nodes that represent real-world objects, making it easier for clients to understand the structure and interact with the data.
Quality of Service: OPC UA supports defining the quality of the values being transferred, which can affect the behavior of data exchange. For example, qualities like "Good", "Uncertain", or "Bad" influence how clients handle data and what actions are triggered based on data validity.
Subscriptions and MonitoredItems: The Subscription model in OPC UA allows clients to monitor changes to data or events from servers. The Subscription entity, along with MonitoredItems, is used to track data changes efficiently and notify clients about updates, reducing the need for constant polling.
Security and Redundancy: OPC UA has integrated a strong security model, which includes encryption, user authentication, and application-level security measures. The redundancy features allow multiple paths to maintain a connection, ensuring high availability even in the case of network or server failures.