Using the Variables window to access OPC-DA Client tags

Once you have defined a device, you can use the Workbench to access the tags that reside in the OPC-DA 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.
  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-DA Client driver, see OPC-DA Client supported access.
  3. 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-DA server using the server’s programming tools. Additionally, the default access rights for array elements is read-only, unless the Prohibit writing array elements property has been set to true. In that case the access rights defined on the server for the array element will be applied.

Missing variables

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-DA server. There are three reason 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-DA Client driver requires that all tags have a specific data type defined on the server, if the tag data type is not defined, it will cause an issue. To resolve this, the driver performs a read request for the variable and uses the returned variant type to determine the data type.
  2. The OPC data type is not supported by the runtime. See OPC-DA 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.