OPC UA allows information to be represented as complex Variables(Variablewith nested sub-variable) and/or as complex DataTypes, where a DataTypehas a structure or other special meaning associated with it. Each of the nested Variables can have a value that represents a simple base DataTypesuch as an Integer or can represent a custom DataTypesuch as a Currency or a structure.
The format of a value is represented by Attributesof Variables. This standard maps all value formats defined in ISA-95 into those attributes.
Arrays of values are represented by DataType, ValueRank, ArrayDimensions, and MaxArrayLengthattribute of a VariableType. (See OPC 10000-3). The following examples illustrate the usage of these Attributes:
- A set of values for a single dimension array of integers with 6 values
EBNF: [ 1 , 2 , 3 , 4 , 5 , 6]
OPC UA: DataType=Int32(any), ValueRank=OneDimension(1), ArrayDimensions=6, MaxArrayLength=6.
- A set of values for a two dimension array of size 2x3
EBNF: [ [1 , 2] , [3 , 4] ,[5 , 6]]
OPC UA: DataType=Int32(any), ValueRank= 2, ArrayDimensions=[2,3], MaxArrayLength=6
- A set of values for a four dimension array of size 2x3x4x5
EBNF: omitted for simplicity
OPC UA: DataType=Int32(any), ValueRank= 4, ArrayDimensions=[2,3,4,5], MaxArrayLength=120
Ranges of values are represented by Range DataTypedefined in OPC 10000-8. If the Range is an array, then ValueRank, ArrayDimensions, and MaxArrayLengthattributes are utilized to indicate an array.
- A simple range of values
EBNF:{0..100}
OPC UA : DataType=Range, ValueRank= Scalar (−1)
- A non-continuous range of values
EBNF: {0 .. 100 , 200 .. 300 , 500 , 600 .. 650}
OPC UA : DataType=Range, ValueRank= OneDimension (1), ArrayDimensions=4
A set of allowed values is defined in EnumStrings andthe EnumValues Standard Propertyof Enumeration DataType.
- A series of values that defines colours.
EBNF: <Red, Green, Yellow, Blue>
OPC UA : Array of LocalizedTextthat is a list of the enumeration strings is set to EnumStrings
Structured data element is defined in custom DataTypederived from Structure DataTypeor is represented by nested VariableTypethat has Variablesas children.
- A structured data element represented as flattened Property Name
Struct Simple {
Integer Position;
Float LastValue;
Boolean Exists;
String Comment;}
ISA-95: Simple.Position, Simple.LastValue, Simple.Exists, Simple.Comment
OPC UA: ABC DataType(custom DataType) derived from Structure DataType is defined, with the given structure.
- A structured data element represented by creating an ISA95Property with no data value with nested child ISA95Properties and identification of element.
Struct Simple {
public int Position;
public double LastValue;
public bool Exists;
public string Comment;}
ISA-95: Property [ID=”Simple”]
Property [ID=”Simple”]\ Property [ID=”Position”]
Property [ID=”Simple”]\ Property [ID=”LastValue”]
Property [ID=”Simple”]\ Property [ID=”Exists”]
Property [ID=”Simple”]\ Property [ID=”Comment”]
OPC UA: All ISA95Properties are represented as Variablesand Simple property points to Position, LastValue, Exists, and Comment properties by HasComponent or subtypes of HasComponent ReferenceType.(See clause 4.3.8.6)
- A combination of a) and b) where a structured data element represented by creating a ISA95 Property with a data value that is a structured data element and with nested child properties and identification of element (see Figure 14). This is the preferred method for modelling complex information. [Note: the figure flow the template defined in OPC 10000-3with some extensions defined in Annex F]
Figure 14- Complex Data Mapping