Using the Variables window to access OPC-UA Client tags

Once you have defined a device, you can use the Workbench to access the tags that reside in the OPC-UA server represented by that device. 

  1. From the Workbench left pane, select the Variables icon. The Variables window appears as the right pane. 

    The Variables window provides a tree format that lists the started devices in the node. The devices must be in the Started state to be included in the Variables window.
    Each device can be expanded to show the variables that reside in that device. 
    The image above depicts the OPC UA Tag representation when the Display Tags as Structures device definition setting is False, the default setting. The timestamp and status setting of each tag is not available. Reading or writing the variable will modify the value of the OPC UA tag. 
  2. You can expand or collapse the tree format to zoom in or out on a device’s variables.
    When you get to an individual data element, you have access to the Read and Write functions to read a device’s data element or write a device’s data element.
    For information on data types and data conversion supported by the OPC-UA Client driver, see OPC-UA Client supported access.

    This image of the Variables panel depicts the variables displayed when the OPC UA device definition has the Display Tags as Structures field set with a value of True. With this definition the value of the OPC UA tag can be read and written. The OPC Server's timestamp and the status code of the tag are available for read only access. 
  3. A variable's location name can be a maximum of 128 characters long. The variable location name consists of the parent structure names plus the variable name. Renaming a variable to fit the 128 character limit will allow you to read and write to the variable. A variable with a location name greater than 128 characters long will not be able to be accessed, and will return an "Error: Variable does not exist" error.

  4. You must ensure that the appropriate levels of security access privileges are in place to restrict the access to data elements to those personnel who have the proper knowledge and understanding when reading or writing device data elements. For more information, see System administration > Security.
    Some of the data elements may also be configured to be read only within the OPC-UA server using the server’s programming tools.

Unsupported data types

There may be situations where the list of tags shown on the Variables panel do not match the list of tags that are defined on the OPC-UA server. There are three reasons why a tag defined in the server does not appear on the Variables panel. 

  1. The data type of the tag was not defined on the server. The OPC-UA Client driver requires that all tags have an accompanying OPC data property defined. 
  2. The OPC data type is not supported by the runtime. See OPC-UA Client supported access for a list of supported and non-supported data types. 
  3. The name of the OPC tag contains characters that are reserved in the runtime for other purposes. Device variable names can contain a combination of letters, numbers, spaces, the underscore character, and the dash character. Other special characters such as the open or close brackets, parenthesis, and single or double quotation marks are invalid characters for device variable names.