Using the Workbench to define an OPC-UA Client device

The Workbench provides the view into a node's installation, configuration and resource definition. It also provides access and control over those resources.

device is a resource that can represent a physical device, such as a programmable logic controller (PLC), an RF tag reader or a sensor. A device can also be defined in one node to represent a device that is defined and supported in another node. This allows your application solution to have access to devices and their data independent of their location or connectivity details.

An OPC-UA Client device is a resource that is a client to an OPC-UA server.

To define a device that represents an OPC-UA Client device, follow these steps:

  1. From the Workbench left pane, expand the node where you want to define the OPC-UA Client device. 
  2. Right-click Devices and then select New.

    The Device window appears. 
  3. Enter the Name of the device. The device name can be up to 64 characters and include letters, numbers, and the underscore character. Spaces are allowed. 
  4. Click on the Type down-arrow and select UA Client under OPC. The available device types are determined by the driver packages that are installed on the node. 

    The Device window changes to accommodate the selected device type.
  5. To define a device that represents an OPC-UA Client, set this new device's parameters as follows:

    ParameterDescription
    Endpoint URLThe URL of the OPC-UA server to connect to.
    TimeoutThe amount of time, in milliseconds, to wait for a response from the OPC-UA server for read and write requests.
    Minimum String SizeThe minimum String length to use for String type variables. Variables with shorter lengths will default to this length value.
    Display Tags as StructuresThe default value is False, where each tag is represented as a distinct item. Reads or Writes to the tag will affect the OPC tag's value. Setting this value to True will result in each OPC tag being represented within the system as a structure with three members:
    The StatusCode member will show the quality of the tag.
    The Timestamp member will contain the tag's server timestamp, the time the value was last updated.
    The Value member will contain the actual data value associated with the tag.
    Note: This parameter is not available on:
    - Asset Gateway for Mitsubishi CCPU
    - Mitsubishi MESInterface IT.
    Default Array SizeThe size to use for arrays, when their true size cannot be determined.
    Authentication SettingsThe authentication mechanism to use to connect to the OPC-UA server. Supported methods are anonymous, username/password and certificate.
    UsernameUsername used for username/password authentication. Only shown if authentication setting is username/password.
    PasswordPassword used for username/password authentication. Only shown if authentication setting is username/password.
    X.509 Certificate The certificate to use for authentication. Only displayed when certificate is selected in the Authentication Settings field.
    Private Key The private key associated with the certificate. Only displayed when certificate is selected in the Authentication Settings field.
    Private Key Password An optional password to decrypt the given private key file.
    Security Policy The security policy to use when connecting to a server. Supported polices: None, Basic256, Basic128Rsa15, Basic256Sha256, Aes128Sha256RsaOaep, Aes256Sha256RsaPss. For more information on adding the certificate to use with the security policy, see Authorizing Certificates on Kepware OPC UA Server.
    Message Security Mode The level of security for communication to the server. Only Displayed when the Security Policy field is not None. Options: Sign, Sign and Encrypt.
    Max Nodes per BrowseMaximum number of nodes to browse per request.
    Max Nodes per ReadMaximum number of nodes to read per request.
    Enumeration TimeoutThe amount of time, in milliseconds, to wait while enumerating a single tag's information from the OPC-UA server.
    If this timeout is exceeded, the tag is skipped and enumeration continues with the next tag.
    Enumeration OptionAn option to control which objects are enumerated. The default value is All.
    • All - enumerates all objects.
    • Object Data - This option bypasses the Root OPC UA object and all of Root's children.
    • Allowlist - enumerates the objects defined by the Enumeration List parameter. 
    • Denylist - enumerates all objects except the objects defined by the Enumeration List parameter.

    For more information, see Variable enumeration when the OPC-UA device starts.

    Enumeration ListA comma-separated list of objects to whitelist or blacklist. Only shown if the Enumeration Option parameter is Allowlist or Denylist.
    • A period '.' is the separator within an object. A comma ',' is the separator between multiple objects.
    • An asterisk wild card character '*'  is supported for as the last portion of the object name.
    • Example: Objects.Server, Objects.d*
      Note: The wild card character is not allowed in the parent object names. For example, Obj*.Server is not allowed due to the wild card character after "Obj". It should be Objects.Server to be valid.
    Enumeration from XMLIndicates how tag enumeration is to be done when an OPC UA Client device starts.
    • Select No, when the enumeration is performed by querying the OPC UA Server for the tag tree.
    • Select Yes, will build the tag tree by querying the server one time. The results will be stored in an XML file and future device starts will enumerate the tag tree by referencing the XML file.
    Subscribe To Tags

    When option = Yes, automatically create subscriptions for a tag, the first time the tag is read. This will occur when a tag is read from either the Variables Window or from within a Trigger. This will improve the performance of the OPC UA Client as it no longer will send all read requests to the OPC UA server. Instead the initial read request will be sent to the OPC UA server and the value stored in memory. The OPC UA Server will send data value change notifications to the OPC UA Client driver. The driver will update its memory with the new value. All subsequent read requests will be performed against the data in memory, rather than sending requests to the server. Be aware that this may increase the work load on the OPC UA server.

    The default value is No.

    Subscription Rate (ms)

    Only used if the Subscribe To Tags parameter is Yes.

    The rate which the server will publish data changes. Though entries between 200ms and 30000ms are allowed, this value is dependent upon what the OPC UA Server can support. For example, if a value of 1000ms is supplied, but the OPC UA Server can only support 2000ms, the 2000ms value will be used.

    Per variable security

    Select False to disable the allocation of additional memory to track the user to variable access for all variables in this device. 
    Select True to enable this feature if required. For more information, see Setting up Read Write per device variable.
  6. Click Validate to have the parameters validated and to connect to the OPC-UA server application. If there are problems connecting to the OPC-UA server, an error code will be displayed. 
  7. Click Save to save the device definition. The device will appear in the Devices window list of devices. 
    You can now control the device (StartStop), access the device's variables by using the Variables window and build solutions that use the device's resources.