Following is a description of the DataTypes defined in this specification.
DataTypes like String, Boolean, Double or LocalizedText are defined in OPC 10000-3. Their representation is specified in OPC 10000-5.
This structure defines the Range for a value. Its elements are defined in Table 17.
Table 17 – Range DataType structure
Name |
Type |
Description |
Range |
structure |
|
low |
Double |
Lowest value in the range. |
high |
Double |
Highest value in the range. |
NOTE For some DataTypes, e.g. Int64, UInt64, or Decimal, there may be a loss in precision in the representation of the range with a Double.
If a limit is not known a NaN shall be used.
Its representation in the AddressSpace is defined in Table 18
Table 18 – Range definition
Attribute |
Value |
|||||
BrowseName |
Range |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Base Info Range DataType |
EUInformation contains information about the EngineeringUnits.
The intention of the OPC UA standard is not to define a set of units but a way to expose units based on existing systems. Since there is not a single worldwide set of units used in all industries, the EUInformation structure includes a separate field (the namespaceUri) to identify the system on which the exposed unit is based.
The default OPC UA mapping is based on UN/CEFACT as defined in clause 5.6.3.4, because it can be programmatically interpreted by generic OPC UA Clients. However, the EUInformation structure has been defined such that other standards bodies can incorporate their engineering unit definitions into OPC UA. If Servers use such an approach then they shall identify this standards body by using a proper URI in EUInformation.namespaceUri.
Servers can enhance EUInformation by providing the Quantity and Unit model (see 0) and referencing from EUInformation instances to the appropriate instances for quantity and unit. See Figure 5 for an example.
Figure 5 – Enhanced EUInformation example
The EUInformation elements are defined in Table 19.
Table 19 – EUInformation DataType structure
Name |
Type |
Description |
EUInformation |
structure |
|
namespaceUri |
String |
Identifies the organization (company, standards organization) that defines the EUInformation. |
unitId |
Int32 |
Identifier for programmatic lookup. −1 is used if a unitId is not available. |
displayName |
LocalizedText |
The displayName of the engineering unit is typically the abbreviation of the engineering unit, for example "h" for hour or "m/s" for meter per second. |
description |
LocalizedText |
Contains the full name of the engineering unit such as "hour" or "meter per second". |
Its representation in the AddressSpace is defined in Table 20.
Table 20 – EUInformation definition
Attribute |
Value |
|||||
BrowseName |
EUInformation |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Base Info EUInformation |
This clause specifies how to apply the “Codes for Units of Measurement” published by the “United Nations Centre for Trade Facilitation and Electronic Business” (see https://www.unece.org/cefact/codesfortrade/codes_index.html). This recommendation establishes a single list of code elements to represent units of the International System of Units (SI Units) like units of measure for length, mass (weight), volume and other quantities and in addition covers administration, commerce, transport, science, technology, industry etc. It provides a fixed code that can be used for automated evaluation.
Table 21 contains a small excerpt of the relevant columns in the UNECE recommendation:
Table 21 – Examples from the UNECE Recommendation
Excerpt from Recommendation N°. 20, Annex 1 |
||
Common Code |
Name |
Symbol |
C81 |
radian |
rad |
C25 |
milliradian |
mrad |
MMT |
millimetre |
mm |
HMT |
hectometre |
hm |
KMT |
kilometre |
km |
KMQ |
kilogram per cubic metre |
kg/m3 |
FAH |
degree Fahrenheit |
°F |
The UNECE recommendation in several cases defines multiple instances of the same unit (same name and symbol) for different quantities. Therefore, the relevant information for EUInformation.unitId, EUInformation.displayName, and EUInformation.description has been extracted by eliminating duplicates. This extract is available here:
http://www.opcfoundation.org/UA/EngineeringUnits/UNECE/UNECE_to_OPCUA.csv
This mapping has been generated as follows:
- The namespaceUri shall be http://www.opcfoundation.org/UA/units/un/cefact
- The Common Code (represented as an alphanumeric variable length of up to 3 characters) has been converted into a 32 Bit Integer and is used for the unitId. The following pseudo code specifies the conversion algorithm:
Int32 unitId = 0; Int32 c; for (i=0; i<=3;i++) {
c = CommonCode[i]; if (c == 0) break; // end of Common Code unitId = unitId << 8; unitId = unitId | c;}
- The Symbol field shall be used as invariant locale for displayName. Servers may configure multiple additional locales for each displayName. However, if none of the LocaleIds specified by the Client for the Session matches these additional locales, the Server shall return the invariant locale.
- The Name field shall be used as invariant locale for description. Servers may configure multiple additional locales for each description. However, if none of the LocaleIds specified by the Client for the Session matches these additional locales, the Server shall return the invariant locale.
This structure defines float IEEE 32 bits complex value. Its elements are defined in Table 22.
Table 22 – ComplexNumberType DataType structure
Name |
Type |
Description |
ComplexNumberType |
structure |
|
real |
Float |
Value real part |
imaginary |
Float |
Value imaginary part |
Its representation in the AddressSpace is defined in Table 23
Table 23 – ComplexNumberType definition
Attribute |
Value |
|||||
BrowseName |
ComplexNumberType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Data Access Complex Number |
This structure defines double IEEE 64 bits complex value. Its elements are defined in Table 24.
Table 24 – DoubleComplexNumberType DataType structure
Name |
Type |
Description |
DoubleComplexNumberType |
structure |
|
real |
Double |
Value real part |
imaginary |
Double |
Value imaginary part |
Its representation in the AddressSpace is defined in Table 25.
Table 25 – DoubleComplexNumberType definition
Attribute |
Value |
|||||
BrowseName |
DoubleComplexNumberType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Data Access DoubleComplex Number |
This structure defines the information for auxiliary axis for ArrayItemType Variables.
There are three typical uses of this structure:
- The step between points is constant and can be predicted using the range information and the number of points. In this case, axisSteps can be set to NULL.
- The step between points is not constant, but remains the same for a long period of time (from acquisition to acquisition for example). In this case, axisSteps contains the value of each step on the axis.
- The step between points is not constant and changes at every update. In this case, a type like XYArrayType shall be used and axisSteps is set to NULL.
Its elements are defined in Table 26.
Table 26 – AxisInformation DataType structure
Name |
Type |
Description |
AxisInformation |
structure |
|
engineeringUnits |
EUInformation |
Holds the information about the engineering units for a given axis. |
eURange |
Range |
Limits of the range of the axis |
title |
LocalizedText |
User readable axis title, useful when the units are %, the Title may be “Particle size distribution” |
axisScaleType |
AxisScaleEnumeration |
LINEAR, LOG, LN, defined by AxisSteps |
axisSteps |
Double[] |
Specific value of each axis steps, may be set to “Null” if not used |
Its representation in the AddressSpace is defined in Table 27.
Table 27 – AxisInformation definition
Attribute |
Value |
|||||
BrowseName |
AxisInformation |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Data Access AxisInformationType |
When the steps in the axis are constant, axisSteps may be set to “Null” and in this case, the Range limits are used to compute the steps. The number of steps in the axis comes from the parent ArrayItem.ArrayDimensions.
This enumeration identifies on which type of axis the data shall be displayed. Its values are defined in Table 28.
Table 28 – AxisScaleEnumeration values
Name |
Value |
Description |
LINEAR |
0 |
Linear scale |
LOG |
1 |
Log base 10 scale |
LN |
2 |
Log base e scale |
Its representation in the AddressSpace is defined in Table 29.
Table 29 – AxisScaleEnumeration definition
Attribute |
Value |
||||
BrowseName |
AxisScaleEnumeration |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
Subtype of the Enumeration type defined in OPC 10000-5 |
|||||
HasProperty |
Variable |
EnumStrings |
LocalizedText[] |
PropertyType |
|
Conformance Units |
|||||
Data Access ArrayItem2Type |
This structure defines a physical value relative to a X axis and it is used as the DataType of the Value of XYArrayItemType. For details see 5.3.4.3.
Many devices can produce values that can perfectly be represented with a float IEEE 32 bits but, they can position them on the X axis with an accuracy that requires double IEEE 64 bits. For example, the peak value in an absorbance spectrum where the amplitude of the peak can be represented by a float IEEE 32 bits, but its frequency position required 10 digits which implies the use of a double IEEE 64 bits.
Its elements are defined in Table 30.
Table 30 – XVType DataType structure
Name |
Type |
Description |
XVType |
structure |
|
x |
Double |
Position on the X axis of this value |
value |
Float |
The value itself |
Its representation in the AddressSpace is defined in Table 31.
Attribute |
Value |
|||||
BrowseName |
XVType |
|||||
IsAbstract |
False |
|||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
|
Subtype of Structure defined in OPC 10000-5. |
||||||
Conformance Units |
||||||
Data Access XYArrayItemType |