OPC-UA Client supported access

This page describes the data elements and data types supported by a OPC-UA Client driver.

Data types and data conversion

The OPC-UA Client driver supports the following OPC data types and their mapping to runtime data types as follows: 

OPC Data Type

Runtime Data Type

BOOL BOOL
BYTE UINT1
SBYTE INT1
STRING STRING
DOUBLE FLOAT8
FLOAT FLOAT4
INT16 INT2
INT32 INT4
INT64 INT8
UINT16 UINT2
UINT32 UINT4
UINT64 UINT8
BYTE_STRING STRING

Special Data Handling

OPC Arrays

On OPC-UA servers, variables containing array values are dynamic, meaning they can change length after initialization. deviceWISE handles array sizes statically and will not support changing array size after an array has been initialized.

Newer OPC-UA servers support reading and writing to specific index ranges within an array. The UA Client will support this functionality if the feature is implemented on the server. Reading or writing to an OPC-UA server that does not support this will result in a failed transaction and a -6236 error code. Full array reads and writes will still be available for servers without this support.

Multi dimensional array reading and writing is not supported

OPC Strings

String and byte string handling in the UA Client driver also requires special handling as strings in OPC-UA servers are sized dynamically. The UA Client driver will set the minimum string length to 64 characters. The user will be able to change the minimum string size by defining a property named Mininum String Size with a numeric value between 0 and 65535, in the additional properties section of the device definition.  If a string variable exceeds the default string size upon initialization, the string size will be set to match the variable's length. String and bytestring array elements will also default to 64 characters. If any elements of the array exceed this size, the max length of all elements in the array will be set to the length of the longest element at enumeration.

OPC Variables

OPC-UA supports having variables within variables. In order to display child variables in deviceWISE, a structure will be created with the name of the parent variable followed by an underscore. Child variable nodes will be placed within this structure.

OPC Structures

The OPC UA specification allows for structures to be readable. A structure being a top-level element that contains children elements of varying data types. The ability to read at the structure level will provide a binary representation of the values of the children elements within the structure. In these situations, the structure is readable, but the child elements cannot be read on an individual basis. This behavior is typically associated with structures that contain data members, whose values rarely change. An example of this might be a structure that contains information about the hardware, such as model number and firmware level, items that rarely if ever change.

The OPC UA Client driver provides the ability to read OPC Structure tags if the OPC UA Server allows these tags to be read. These tags can be read from within a deviceWISE Trigger using either the Set action, the Device Demand Read action, or the Device Enhanced Demand Read action. The data will be returned as Binary typed data. It will be up to the user to parse the binary data into individual data elements using the Binary Decode Binary Buffer action. A strategy to access this data would be to use the Set action to read the data from the OPC UA Server and store the data into a Trigger Local Variable with a Binary data type. The Local Variable would then be used as input into the Binary Decode Binary Buffer action to retrieve the individual data tags within an OPC Structure tag. The values of the individual data tags could be stored in a Global Variables device for use throughout the deviceWISE application.

Example: Variable X has child variables Y and Z

deviseWISE representation:

X (deviceWISE variable)

X_ (deviceWISE structure)

(deviceWISE variable, member of "X_" structure)
Z (deviceWISE variable, member of "X_" structure)

Variables will be named using the corresponding node's "Display Name".

Limitations

The following table lists the node types that we support and don't support. Unsupported types will not be shown in the enumeration.

Supported

Not supported

Variable Method
Object Reference_Type
Object_Type
Variable_Type
Data_Type
View
AnalogItemType
For information on defining a OPC-UA Client device, see Using the Workbench to define an OPC-UA Client device