Edit this page Backlinks Add to book Export to PDF Book Creator Add this page to your book Book Creator Remove this page from your book Manage book (0 page(s)) Help OPC UA Client Device Plugin General The OPC UA Client Device Plugin provides linkage between Codabix and an OPC UA Server. What Does the Plugin Do? The OPC UA Client Device Plugin establishes and maintains connections to one or more OPC Servers. Every OPC UA Client can be connected through a separate channel. Features Browse OPC UA Servers (or OPC Classic Servers) to automatically create available variables in Codabix Read and write OPC UA/OPC Classic Data Variables Subscribe OPC UA/OPC Classic Data Variables when the corresponding Variable Nodes are subscribed in Codabix Supported Servers OPC-UA Server using the opc.tcp or http protocol OPC Classic (COM) Servers (specified by the ProgID and ClassID) (only on Windows x86 and x64) Purpose & Use Cases The linked OPC UA Servers can simply be controlled by using Codabix. By linking the Nodes of the OPC UA Server to the Nodes defined in Codabix the OPC Node can directly interact with many other Nodes, devices, services, etc. maintained in Codabix. Also, other Codabix participants can interact with the OPC UA Server linked through the OPC UA Client Device Plugin. Installation This plugin is part of the Codabix Setup. Please consult Codabix Setup and First Start for more information on how to install and uninstall this plugin. This plugin is part of the Codabix Setup. Please consult Codabix Setup and First Start for more information on how to install and uninstall this plugin. Requirements Basic requirements of Codabix Enabled outgoing TCP/IP connection via the specified port Configuration Overview The entire OPC UA Client Device Plugin configuration is located under the Node path /System/Devices/OPC UA Client Device. Using this root Node of the device plugin allows the full configuration of the OPC UA Client Device Plugin. Usage The Node tree in the image above depicts the OPC UA Client Device Plugin's default Node tree. To set up one or more OPC UA Client Device Channels, add a Folder Node beneath the Node OPC UA Client Device/Channels (left picture). Afterward the default Node tree for a channel will apperar (right picture). Now the settings for the specified channel can be changed. Also new variables can be created below the OPC UA Client Device/Channels/<Channel>/Variables folder. The link to the OPC Node will be granted using the Path property of the new variable Node. The Path property has to be a validly formatted OPC NodeId, for example 2:Main-PLC/Office 1 - Lights/Front. Every change in the Settings folder will apply as soon as the channel is restarted. Every change in the Variables folder will automatically perform a reconfiguration of the OPC Client in the specified channel. Settings Change Settings Select the Settings property which shall be changed. (e.g. “Application/ServerAddress”) Click “Write a new Value”. (See example screenshot below) Enter the new value in the input field and save the changes. Overview Name Type Default Value Description Application Application Name String Codabix With this name the OPC UA Client will introduce itself to the OPC UA Server. Server Address String opc.tcp://localhost:12345 The URL to the OPC UA Server. Possible protocols are: opc.tcp://, http://, https://, opc.com://. To access OPC Classic (COM) servers on Windows, use the format opc.com://<hostname>(:<port>)/<progId>/<classId>. The optional port number is used by the inline created wrapper server. In case the port number is missing it will be generated between 48000 and 48999 using the <classId>-value. Example for OPC Classic: opc.com://localhost:4711/OPCManager.DA.XML-DA.Server.DA/{E4EBF7FA-CCAC-4125-A611-EAC4981C00EA} Please note: In order to connect to OPC Classic Servers, the “OPC UA Gateway” component must not have been uninstalled in the Codabix Setup, and the option “Allow context-sensitive credentials” needs to be enabled in the Codabix Access Security settings. Additionally, the current version of OPC Core Components Redistributable (x86) needs to be installed. Login Type Enum None Defines which authentication type will be used. Valid Values: Anonymous, Certificate, UserPassword Login Certificate Blob The certificate of the OPC UA Server used for the authentication. Can be uploaded as certificate file. (Has to contain the key of the certificate) Login Name String The user of the OPC UA Server used for the authentication. Login Password String The password for the given user of the OPC UA Server. Session Disconnect Timeout Int32 10000 t.b.a. Reconnect Timeout Int32 10000 t.b.a. Session Timeout Int32 60000 t.b.a. Use Break Detection Boolean True Automatically detects if the connection to the OPC UA Server is interrupted. This is used for automatic reconnection if the connection to Server was lost. Valid Values: True, False Security Policy Algorithm String Auto Valid Values: Auto, Basic128Rsa15, Basic256, Basic256Sha256, Custom, Https, None Policy Level Int32 0 t.b.a. Policy Mode String None Valid Values: None, Sign, SignAndEncrypt Use Domain Checks Boolean False Indicates if the OPC UA Client checks the OPC UA Server for a trusted certificate or not. This is a security feature to prevent e.g. man-in-the-middle attacks. Valid Values: True, False Attention If this option is set to true and the OPC UA Server doesn't have a trusted X.509 certificate (e.g. a self signed certificate) the connection will be rejected. Use Secure Endpoint Boolean True Indicates if the OPC UA Client shall check if the endpoint is secure or not. Some OPC UA Servers might not support this option. Valid Values: True, False Certificate Blob <Blob> The Client certificate. With this certificate the OPC UA Client will introduce itself to the OPC UA Server. A new certificate is created by default. Transport Channel Lifetime Int32 600000 t.b.a. Max Array Length Int32 65535 t.b.a. Max Buffer Size Int32 65535 t.b.a. Max Byte String Length Int32 65535 t.b.a. Max Message Size Int32 1048576 t.b.a. Max String Length Int32 65535 t.b.a. Operation Timeout Int32 60000 t.b.a. Security Token Lifetime Int32 3600000 t.b.a. Variables Every Node beneath System/Devices/OPC UA Client Device/Channels/My Channel 1/Variables can be linked to an OPC Node from the OPC Server of the specified Channel using the Path property. To connect a Codabix Node to an OPC UA Node the Path property has to be formatted as an OPC UA NodeId. OPC NodeId Example NodeId: ns=2;s=Machine_1/IsActive The specified NodeId is splitted in two parts: the Namespace Index and the Identifier of the OPC UA Node. The schema of a string identifier depends on the used OPC UA server. Namespace Index: ns=<Number> e.g. ns=2 Separator: ; Identifier (String): s=<ParentNode1>/<ParentNode2>/…/<ParentNodeX>/<NodeName> Diagnostics The OPC UA Client Device Plugin provides different status information, depending on the layer to inspect. In general the channel-based diagnostic information is produced by the connection status of the channel to the OPC UA Server. The variable-based diagnostic information is produced during the read/write access of the different variables or directly from the OPC UA Server.Channel To monitor and diagnose the status of the different device channels take a look at the following image: The image above depicts the channel's Status Node which displays all status relevant information. The following datapoint Nodes are used to persist the communication status between Codabix and the OPC UA Server. Node Description Category Classifies the status into Information, Warning and Error and therefore indicates the general type of status information. Code Defines the numeric expression/identifier of the status. Severity Rates the status information into Low, Moderate, High and Critical and therefore indicates the urgency of an intervention. Text Describes the status information identified by the Code property. Variables To monitor and diagnose the status of the different OPC UA Client variables take a look at the variables' Status property displayed in Codabix. In case that the Status column displays the value Bad the addressed data area is in most cases not accessible. Log File All device channel related status information is also logged into the channel-specific log file stored in the [LoggingFolder]. Each log file is named following the naming scheme OPC UA Client Device.<ChannelName>.log. The content of such a log file can look as follows: ... [15:31:46 05.09.2016] - Information (Severity=Moderate): Code=[10012], Text=[Creating Client | opc.tcp://192.168.0.116:12345/] ... Using the sample channel the name of the log file would be: OPC UA Client Device.Channel 1.log Status Codes The following table displays the different status information possible. Code Category Information Type -22000 to -22999 Error Error with exception -21000 to -21999 Error Internal error -12000 to -12999 Warning Warning with exception -11000 to -11999 Warning Internal warning 10000 to 10999 Information Information 20000 to 20999 Information Debug Entities Like every device plugin the OPC UA Client Device Plugin extends the basic Codabix Device Model. Like every device plugin the OPC UA Client Device Plugin extends the basic Codabix Device Model. Device The plugin's device type OpcClientDevice also defines the OpcClientDeviceChannel and therefore extends the basic CodabixDevice and CodabixDeviceChannel entities. While the OpcClientDevice just represents a concretization of the CodabixDevice, the OpcClientDeviceChannel extends the CodabixDeviceChannel with the OPC UA Client Variable Entities. Channel Each channel is handled by a channel worker which establishes a physical connection to the OPC UA Server. By default, the worker does not read any values. When a Client or plugin requests a synchronous read of the channel's variables in Codabix (e.g. using the Codabix Web Configuration's function “Read actual value”), the channel worker reads them from the underlying OPC UA Server and then writes them into the corresponding Codabix Nodes. Similarly, when a Client or plugin writes values into the channel's variables, the channel worker will write those values to the underlying OPC UA Server. To have an OPC UA Client variable being read steadily, you can edit the Node in the Configuration Web GUI and set “History Options” to Yes (which will create a subscription internally). In this case, the channel worker subscribes to the variables from the OPC Server (the OPC Client will get the new value from the OPC Server automatically if the value has been changed), and if the value of one of the variables has changed, writes the new value into the corresponding Codabix Node. Folders & Files Folders Content Path Usage AssemblyFolder <CodabixInstallDir>/plugins/OpcUaClientDevicePlugin/ Contains the plugin's assembly file. ConfigFolder <CodabixDataDir>/plugins/OpcUaClientDevicePlugin/ Contains the plugin's configuration file. LoggingFolder <CodabixDataDir>/log/ Contains the plugin's log files. Files Type Path Usage Assembly [AssemblyFolder]/CoDaBix.OpcUaClientDevicePlugin.dll The plugin's assembly file. Logging [LoggingFolder]/OPC UA Client Device.<ChannelName>.log The log file. About Versions This Document Date 2021-01-25 Version 1.3 Plugin Name OPC UA Client Device Plugin Node /System/Devices/OPC UA Client Device Version 1.10.0 Assembly Name Codabix.OpcUaClientDevicePlugin.dll Date 2021-01-25 Version 1.10.0.0 Table of Contents General What Does the Plugin Do? Features Supported Servers Purpose & Use Cases Installation Requirements Configuration Change Settings Overview OPC NodeId Diagnostics Entities Folders & Files About Versions