OPC-UA Client Server supported
access
This page describes the data elements and data types supported by a OPC-UA Client Server 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. Therefore, it 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 Matrix
Two and three dimension OPC matrixes are supported and mapped to corresponding 2 and 3 dimensional arrays in deviceWISE. Array sizes are considered static in the same way as arrays.
OPC Structures
All structures and single dimensional arrays of structures are supported by deviceWISE with the following exceptions.
-
Unions are not supported: Unions contain only 1 value at a time, but can have many different value types. An example of this is the analogue measurement field which could be a Temperature, Voltage or Pressure.
-
Option sets are not supported: Option sets provide bit masking to set which bits are set in a value. Each bit is represented by a name and a flag to indicate if it is true or not.
-
Structures within structures are not supported.
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 Server 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.
OPC Strings
String and byte string handling in the UA Client driver 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 is able to change the minimum string size by defining a property named Minimum 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 variable. Child variable nodes will be placed within this structure.
Example: Variable X has child variables Y and Z
deviseWISE representation:
Example: Variable X has child variables Y and Z
deviseWISE representation:
-
X (deviceWISE variable, member of "X" structure)
-
Y (deviceWISE variable, member of "X" structure)
-
Z (deviceWISE variable, member of "X" structure)
Variables will be named using the corresponding node's "Display Name".
Arrays are consolidated into a single deviceWise variable, with the array length derived from the node attributes for "value rank" and "array dimensions." When the value rank is zero, an additional folder is generated, and the array length is determined upon reading the entire array.
Special Characters
deviceWISE restricts the use of characters such as [ ] ."\' in variable names. If any of these characters are encountered in the "Display name," they will be replaced with an underscore.
OPC Security
OPC UA offers secure communication options through TLS and/or authentication via username and password. Without security measures, transmissions lack encryption, enabling any client to connect to a server. However, with a security policy in place, the server must first trust the certificate for communication to be successful.
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 |