Errata exists for this version of the document.

The DataAccess model extends the variable model by defining VariableTypes. The DataItemType is the base type. ArrayItemType, AnalogItemType and DiscreteItemType (and its TwoState and MultiState subtypes) are specializations. See Figure 2. Each of these VariableTypes can be further extended to form domain or server specific DataItems.

image005.png

Figure 2 DataItem VariableType hierarchy

The StatusCode also contains an informational bit called SemanticsChanged.

Servers that implement Data Access shall set this Bit in notifications if certain Properties defined in this standard change. The corresponding Properties are specified individually for each VariableType.

Clients that use any of these Properties should re-read them before they process the data value.

This VariableType defines the general characteristics of a DataItem. All other DataItem Types derive from it. The DataItemType derives from the BaseDataVariableType and therefore shares the variable model as described in OPC 10000-3 and OPC 10000-5. It is formally defined in Table 1.

Table 1 – DataItemType definition

Attribute

Value

BrowseName

DataItemType

IsAbstract

False

ValueRank

−2 (−2 = ‘Any’)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseDataVariableType defined in OPC 10000-5; i.e the Properties of that type are inherited.

HasSubtype

VariableType

AnalogItemType

Defined in 0

HasSubtype

VariableType

DiscreteItemType

Defined in 5.3.3

HasSubtype

VariableType

ArrayItemType

Defined in 5.3.4

HasProperty

Variable

Definition

String

PropertyType

Optional

HasProperty

Variable

ValuePrecision

Double

PropertyType

Optional

Definition is a vendor-specific, human readable string that specifies how the value of this DataItem is calculated. Definition is non-localized and will often contain an equation that can be parsed by certain clients.

Example: Definition::= “(TempA – 25) + TempB”

ValuePrecision specifies the maximum precision that the Server can maintain for the item based on restrictions in the target environment.

ValuePrecision can be used for the following DataTypes:

  • For Float and Double values it specifies the number of digits after the decimal place.
  • For DateTime values it indicates the minimum time difference in nanoseconds. For example, a ValuePrecision of 20 000 000 defines a precision of 20 ms.

The ValuePrecision Property is an approximation that is intended to provide guidance to a Client. A Server is expected to silently round any value with more precision that it supports. This implies that a Client may encounter cases where the value read back from a Server differs from the value that it wrote to the Server. This difference shall be no more than the difference suggested by this Property.

This VariableType defines the general characteristics of an AnalogItem. All other AnalogItem Types derive from it. The AnalogItemType derives from the DataItemType. It is formally defined in Table 2.

Table 2 AnalogItemType definition

Attribute

Value

BrowseName

AnalogItemType

IsAbstract

False

ValueRank

−2 (−2 = ‘Any’)

DataType

Number

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DataItemType defined in 5.3.1 i.e the Properties of that type are inherited.

HasProperty

Variable

InstrumentRange

Range

PropertyType

Optional

HasProperty

Variable

EURange

Range

PropertyType

Mandatory

HasProperty

Variable

EngineeringUnits

EUInformation

PropertyType

Optional

The following paragraphs describe the Properties of this VariableType. If the analog item’s Value contains an array, the Properties shall apply to all elements in the array.

InstrumentRange defines the value range that can be returned by the instrument.

Example: InstrumentRange::= {-9999.9, 9999.9}

Although defined as optional, it is strongly recommended for Servers to support this Property. Without an InstrumentRange being provided, Clients will commonly assume the full range according to the DataType.

The Range Data Type is specified in 5.6.2.

EURange defines the value range likely to be obtained in normal operation. It is intended for such use as automatically scaling a bar graph display.

Sensor or instrument failure or deactivation can result in a returned item value which is actually outside of this range. Client software must be prepared to deal with this possibility. Similarly a Client may attempt to write a value that is outside of this range back to the server. The exact behaviour (accept, reject, clamp, etc.) in this case is Server-dependent. However, in general Servers shall be prepared to handle this.

Example: EURange::= {-200.0,1400.0}

See also 6.2 for a special monitoring filter (PercentDeadband) which is based on the engineering unit range.

EngineeringUnits specifies the units for the DataItem’s value (e.g., DEGC, hertz, seconds). The EUInformation type is specified in 5.6.3.

Important note: Understanding the units of a measurement value is essential for a uniform system. In an open system in particular where servers from different cultures might be used, it is essential to know what the units of measurement are. Based on such knowledge, values can be converted if necessary before being used. Therefore, although defined as optional, support of the EngineeringUnits Property is strongly advised.

OPC UA recommends using the “Codes for Units of Measurement” (see UN/CEFACT: UNECE Recommendation N° 20). The mapping to the EngineeringUnits Property is specified in 5.6.3.

Examples for unit mixup: In 1999, the Mars Climate Orbiter crashed into the surface of Mars. The main reason was a discrepancy over the units used. The navigation software expected data in newton second; the company who built the orbiter provided data in pound-force seconds. Another, less expensive, disappointment occurs when people used to British pints order a pint in the USA, only to be served what they consider a short measure.

The StatusCode SemanticsChanged bit shall be set if any of the EURange (could change the behaviour of a Subscription if a PercentDeadband filter is used) or EngineeringUnits (could create problems if the client uses the value to perform calculations) Properties are changed (see section 5.2 for additional information).

This VariableType is an abstract type. That is, no instances of this type can exist. However, it might be used in a filter when browsing or querying. The DiscreteItemType derives from the DataItemType and therefore shares all of its characteristics. It is formally defined in Table 3.

Table 3 – DiscreteItemType definition

Attribute

Value

BrowseName

DiscreteItemType

IsAbstract

True

ValueRank

−2 (−2 = ‘Any’)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DataItemType defined in 5.2; i.e the Properties of that type are inherited.

HasSubtype

VariableType

TwoStateDiscreteType

Defined in 5.3.3.2

HasSubtype

VariableType

MultiStateDiscreteType

Defined in 5.3.3.3

HasSubtype

VariableType

MultiStateValueDiscreteType

Defined in 5.3.3.4

This VariableType defines the general characteristics of a DiscreteItem that can have two states. The TwoStateDiscreteType derives from the DiscreteItemType. It is formally defined in Table 4.

Table 4 – TwoStateDiscreteType definition

Attribute

Value

BrowseName

TwoStateDiscreteType

IsAbstract

False

ValueRank

−2 (−2 = ‘Any’)

DataType

Boolean

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

HasProperty

Variable

TrueState

LocalizedText

PropertyType

Mandatory

HasProperty

Variable

FalseState

LocalizedText

PropertyType

Mandatory

TrueState contains a string to be associated with this DataItem when it is TRUE. This is typically used for a contact when it is in the closed (non-zero) state.

for example: "RUN", "CLOSE", "ENABLE", "SAFE“, etc.

FalseState contains a string to be associated with this DataItem when it is FALSE. This is typically used for a contact when it is in the open (zero) state.

for example: "STOP", "OPEN", "DISABLE", "UNSAFE“, etc.

If the item contains an array, then the Properties will apply to all elements in the array.

The StatusCode SemanticsChanged bit shall be set if any of the FalseState or TrueState ( changes can cause misinterpretation by users or (scripting) programs) Properties are changed (see section 5.2 for additional information).

This VariableType defines the general characteristics of a DiscreteItem that can have more than two states. The MultiStateDiscreteType derives from the DiscreteItemType. It is formally defined in Table 5.

Table 5 – MultiStateDiscreteType definition

Attribute

Value

BrowseName

MultiStateDiscreteType

IsAbstract

False

ValueRank

−2 (−2 = ‘Any’)

DataType

UInteger

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

HasProperty

Variable

EnumStrings

LocalizedText[]

PropertyType

Mandatory

EnumStrings is a string lookup table corresponding to sequential numeric values (0, 1, 2, etc.)

Example:

”OPEN”

”CLOSE”

”IN TRANSIT” etc.

Here the string “OPEN” corresponds to 0, “CLOSE” to 1 and “IN TRANSIT” to 2.

Clients should be prepared to handle item values outside of the range of the list; and robust servers should be prepared to handle writes of illegal values.

If the item contains an array then this lookup table shall apply to all elements in the array.

NOTE The EnumStrings property is also used for Enumeration DataTypes (for the specification of this DataType, see OPC 10000-3).

The StatusCode SemanticsChanged bit shall be set if the EnumStrings ( changes can cause misinterpretation by users or (scripting) programs) Property is changed (see section 5.2 for additional information).

This VariableType defines the general characteristics of a DiscreteItem that can have more than two states and where the state values (the enumeration) does not consist of consecutive numeric values (may have gaps) or where the enumeration is not zero-based. The MultiStateValueDiscreteType derives from the DiscreteItemType. It is formally defined in Table 6.

Table 6 – MultiStateValueDiscreteType definition

Attribute

Value

BrowseName

MultiStateValueDiscreteType

IsAbstract

False

ValueRank

Scalar

DataType

Number

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DiscreteItemType defined in 5.3.3; i.e the Properties of that type are inherited.

HasProperty

Variable

EnumValues

See OPC 10000-3

Mandatory

HasProperty

Variable

ValueAsText

See OPC 10000-3

Mandatory

EnumValues is an array of EnumValueType. Each entry of the array represents one enumeration value with its integer notation, a human-readable representation, and help information. This represents enumerations with integers that are not zero-based or have gaps (e.g. 1, 2, 4, 8, 16). See OPC 10000-3 for the definition of this type. MultiStateValueDiscrete Variables expose the current integer notation in their Value Attribute. Clients will often read the EnumValues Property in advance and cache it to lookup a name or help whenever they receive the numeric representation.

MultiStateValueDiscrete Variables can have any numeric Data Type; this includes signed and unsigned integers from 8 to 64 Bit length.

The numeric representation of the current enumeration value is provided via the Value Attribute of the MultiStateValueDiscrete Variable. The ValueAsText Property provides the localized text representation of the enumeration value. It can be used by Clients only interested in displaying the text to subscribe to the Property instead of the Value Attribute.

This abstract VariableType defines the general characteristics of an ArrayItem. Values are exposed in an array but the content of the array represents a single entity like an image. Other DataItems might contain arrays that represent for example several values of several temperature sensors of a boiler.

ArrayItemType or its subtype shall only be used when the Title and AxisScaleType Properties can be filled with reasonable values. If this is not the case DataItemType and subtypes like AnalogItemType, which also support arrays, shall be used. The ArrayItemType is formally defined in Table 7.

Table 7 – ArrayItemType definition

Attribute

Value

BrowseName

ArrayItemType

IsAbstract

True

ValueRank

0 (0 = OneOrMoreDimensions)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the DataItemType defined in 5.3.1; i.e the Properties of that type are inherited.

HasSubtype

VariableType

YArrayItemType

Defined in 5.3.4.2

HasSubtype

VariableType

XYArrayItemType

Defined in 5.3.4.3

HasSubtype

VariableType

ImageItemType

Defined in 5.3.4.4

HasSubtype

VariableType

CubeItemType

Defined in 5.3.4.5

HasSubtype

VariableType

NDimensionArrayItemType

Defined in 5.3.4.6

HasProperty

Variable

InstrumentRange

Range

PropertyType

Optional

HasProperty

Variable

EURange

Range

PropertyType

Mandatory

HasProperty

Variable

EngineeringUnits

EUInformation

PropertyType

Mandatory

HasProperty

Variable

Title

LocalizedText

PropertyType

Mandatory

HasProperty

Variable

AxisScaleType

AxisScaleEnumeration

PropertyType

Mandatory

InstrumentRange defines the range of the Value of the ArrayItem.

EURange defines the value range of the ArrayItem likely to be obtained in normal operation. It is intended for such use as automatically scaling a bar graph display.

EngineeringUnits holds the information about the engineering units of the Value of the ArrayItem.

For additional information about InstrumentRange, EURange, and EngineeringUnits see the description of AnalogItemType in 0.

Title holds the user readable title of the Value of the ArrayItem.

AxisScaleType defines the scale to be used for the axis where the Value of the ArrayItem shall be displayed.

The StatusCode SemanticsChanged bit shall be set if any of the InstrumentRange, EURange, EngineeringUnits or Title Properties are changed (see 5.2 for additional information).

YArrayItemType represents a single-dimensional array of numerical values used to represent spectra or distributions where the x axis intervals are constant. YArrayItemType is formally defined in Table 8.

Table 8 – YArrayItemType definition

Attribute

Value

BrowseName

YArrayItemType

IsAbstract

False

ValueRank

1

DataType

BaseDataType

ArrayDimensions

{0} (0 = UnknownSize)

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ArrayItemType defined in 5.3.4.1

HasProperty

Variable

XAxisDefinition

AxisInformation

PropertyType

Mandatory

The Value of the YArrayItem contains the numerical values for the Y-Axis. Engineering Units and Range for the Value are defined by corresponding Properties inherited from the ArrayItemType.

The DataType of this VariableType is restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.

The XAxisDefinition Property holds the information about the Engineering Units and Range for the X-Axis.

The StatusCode SemanticsChanged bit shall be set if any of the following five Properties are changed: InstrumentRange, EURange, EngineeringUnits, Title or XAxisDefinition (see 5.2 for additional information).

Figure 3 shows an example of how Attributes and Properties may be used in a graphical interface.

image006.png

Figure 3 – Graphical view of a YArrayItem

Table 9 describes the values of each element presented in Figure 3.

Table 9 YArrayItem item description

Attribute / Property

Item value

Description

Magnitude Response (dB)

axisScaleType

AxisScaleEnumeration.LINEAR_0

InstrumentRange.low

-90

InstrumentRange.high

5

EURange.low

-90

EURange.high

2

EngineeringUnits.namespaceUrl

http://www.opcfoundation.org/UA/units/un/cefact

EngineeringUnits.unitId

2N

EngineeringUnits.displayName

“en-us”, “dB”

EngineeringUnits.description

“en-us”, “decibel”

Title

Magnitude

XAxisDefinition.EngineeringUnits.namespaceUrl

http://www.opcfoundation.org/UA/units/un/cefact

XAxisDefinition.EngineeringUnits.unitId

kHz

XAxisDefinition.EngineeringUnits.displayName

“en-us”, “kHz”

XAxisDefinition.EngineeringUnits.description

“en-us”, “kilohertz”

XAxisDefinition.Range.low

0

XAxisDefinition.Range.high

25

XAxisDefinition.title

“en-us”, “Frequency”

XAxisDefinition.axisScaleType

AxisScaleEnumeration.LINEAR_0

XAxisDefinition.axisSteps

null

Interpretation notes:

  • Not all elements of this table are used in the graphic.
  • The X axis is displayed in reverse order, however, the XAxisDefinition.Range.low shall be lower than XAxisDefinition.Range.high. It is only a graphical representation that reverses the display order.
  • There is a constant X axis

XYArrayItemType represents a vector of XVType values like a list of peaks, where XVType.x is the position of the peak and XVType.value is its intensity. XYArrayItemType is formally defined in Table 10.

Table 10 – XYArrayItemType definition

Attribute

Value

BrowseName

XYArrayItemType

IsAbstract

False

ValueRank

1

DataType

XVType (defined in 5.6.8)

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ArrayItemType defined in 5.3.4.1

HasProperty

Variable

XAxisDefinition

AxisInformation

PropertyType

Mandatory

The Value of the XYArrayItem contains an array of structures (XVType) where each structure specifies the position for the X-Axis (XVType.x) and the value itself (XVType.value), used for the Y-Axis. Engineering units and range for the Value are defined by corresponding Properties inherited from the ArrayItemType.

XAxisDefinition Property holds the information about the Engineering Units and Range for the X-Axis.

The axisSteps of XAxisDefinition shall be set to NULL because it is not used.

The StatusCode SemanticsChanged bit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title or XAxisDefinition Properties are changed (see 5.2 for additional information).

ImageItemType defines the general characteristics of an ImageItem which represents a matrix of values like an image, where the pixel position is given by X which is the column and Y the row. The value is the pixel intensity.

ImageItemType is formally defined in Table 11.

Table 11 – ImageItemType definition

Attribute

Value

BrowseName

ImageItemType

IsAbstract

False

ValueRank

2 (2 = two dimensional array)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ArrayItemType defined in 5.3.4.1

HasProperty

Variable

XAxisDefinition

AxisInformation

PropertyType

Mandatory

HasProperty

Variable

YAxisDefinition

AxisInformation

PropertyType

Mandatory

Engineering units and range for the Value are defined by corresponding Properties inherited from the ArrayItemType.

The DataType of this VariableType is restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.

The ArrayDimensions Attribute for Variables of this type or subtypes shall use the first entry in the array ([0]) to define the number of columns and the second entry ([1]) to define the number of rows, assuming the size of the matrix is not dynamic.

XAxisDefinition Property holds the information about the engineering units and range for the X-Axis.

YAxisDefinition Property holds the information about the engineering units and range for the Y-Axis.

The StatusCode.SemanticsChanged bit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title, XAxisDefinition or YAxisDefinition Properties are changed.

CubeItemType represents a cube of values like a spatial particle distribution, where the particle position is given by X which is the column, Y the row and Z the depth. In the example of a spatial partical distribution, the value is the particle size. CubeItemType is formally defined in Table 12.

Table 12 – CubeItemType definition

Attribute

Value

BrowseName

CubeItemType

IsAbstract

False

ValueRank

3 (3 = three dimensional array)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ArrayItemType defined in 5.3.4.1

HasProperty

Variable

XAxisDefinition

AxisInformation

PropertyType

Mandatory

HasProperty

Variable

YAxisDefinition

AxisInformation

PropertyType

Mandatory

HasProperty

Variable

ZAxisDefinition

AxisInformation

PropertyType

Mandatory

Engineering units and range for the Value are defined by corresponding Properties inherited from the ArrayItemType.

The DataType of this VariableType is restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.

The ArrayDimensions Attribute for Variables of this type or subtypes should use the first entry in the array ([0]) to define the number of columns, the second entry ([1]) to define the number of rows, and the third entry ([2]) define the number of steps in the Z axis, assuming the size of the matrix is not dynamic.

XAxisDefinition Property holds the information about the engineering units and range for the X-Axis.

YAxisDefinition Property holds the information about the engineering units and range for the Y-Axis.

ZAxisDefinition Property holds the information about the engineering units and range for the Z-Axis.

The StatusCode SemanticsChanged bit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title, XAxisDefinition, YAxisDefinition or ZAxisDefinition Properties are changed (see 5.2 for additional information).

This VariableType defines a generic multi-dimensional ArrayItem.

This approach minimizes the number of types however it may be proved more difficult to utilize for control system interactions.

NDimensionArrayItemType is formally defined in Table 13.

Table 13 – NDimensionArrayItemType definition

Attribute

Value

BrowseName

NdimensionArrayItemType

IsAbstract

False

ValueRank

0 (0 = OneOrMoreDimensions)

DataType

BaseDataType

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the ArrayItemType defined in 5.3.4.1

HasProperty

Variable

AxisDefinition

AxisInformation []

PropertyType

Mandatory

The DataType of this VariableType is restricted to SByte, Int16, Int32, Int64, Float, Double, ComplexNumberType and DoubleComplexNumberType.

AxisDefinition Property holds the information about the Engineering Units and Range for all axis.

The StatusCode SemanticsChanged bit shall be set if any of the InstrumentRange, EURange, EngineeringUnits, Title or AxisDefinition Properties are changed (see 5.2 for additional information).

DataItems are always defined as data components of other Nodes in the AddressSpace. They are never defined by themselves. A simple example of a container for DataItems would be a “Folder Object” but it can be an Object of any other type.

Figure 4 illustrates the basic AddressSpace model of a DataItem, in this case an AnalogItem.

image007.png

Figure 4 – Representation of DataItems in the AddressSpace

Each DataItem is represented by a DataVariable with a specific set of Attributes. The TypeDefinition reference indicates the type of the DataItem (in this case the AnalogItemType). Additional characteristics of DataItems are defined using Properties. The VariableTypes in 5.2 specify which properties may exist. These Properties have been found to be useful for a wide range of Data Access clients. Servers that want to disclose similar information should use the OPC-defined Property rather than one that is vendor-specific.

The above figure shows only a subset of Attributes and Properties. Other Attributes that are defined for Variables in OPC 10000-3 (e.g., Description) may also be available.

This subclause lists the Attributes of Variables that have particular importance for Data Access. They are specified in detail in OPC 10000-3. The following Attributes are particularly important for Data Access:

  • Value
  • DataType
  • AccessLevel
  • MinimumSamplingInterval

Value is the most recent value of the Variable that the Server has. Its data type is defined by the DataType Attribute. The AccessLevel Attribute defines the Server’s basic ability to access current data and MinimumSamplingInterval defines how current the data is.

When a client requests the Value Attribute for reading or monitoring, the Server will always return a StatusCode (the quality and the Server’s ability to access/provide the value) and, optionally, a ServerTimestamp and/or a SourceTimestamp – based on the Client’s request. See OPC 10000-4 for details on StatusCode and the meaning of the two timestamps. Specific status codes for Data Access are defined in 6.3.

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 14.

Table 14 Range DataType structure

Name

Type

Description

Range

structure

low

Double

Lowest value in the range.

high

Double

Highest value in the range.

If a limit is not known a NaN shall be used.

Its representation in the AddressSpace is defined in Table 15

Table 15 Range definition

Attributes

Value

BrowseName

Range

This structure contains information about the EngineeringUnits. Its elements are defined in Table 16.

Table 16 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 evaluation.

−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 17

Table 17 EUInformation definition

Attributes

Value

BrowseName

EUInformation

To facilitate interoperability, OPC UA specifies how to apply the widely accepted “Codes for Units of Measurement” published by the “United Nations Centre for Trade Facilitation and Electronic Business” (see UN/CEFACT: UNECE Recommendation N° 20). It uses and is based on the International System of Units (SI Units) but in addition provides a fixed code that can be used for automated evaluation. This recommendation has been accepted by many industries on a global basis.

The UNECE recommendation can be found here:

https://www.unece.org/cefact/codesfortrade/codes_index.html

The latest UNECE version (Rev 12. Filename = rec20_Rev12e_2016.xls, published in 2016) is available here:

http://www.unece.org/fileadmin/DAM/cefact/recommendations/rec20/rec20_Rev12e_2016.xls

The mapping of the UNECE codes to OPC UA (EUInformation.unitId) is available here:

http://www.opcfoundation.org/UA/EngineeringUnits/UNECE/UNECE_to_OPCUA.csv

Table 18 contains a small excerpt of the published Annex with Code Lists:

Table 18 – Examples from the UNECE Recommendation

Excerpt from Recommendation N°. 20, Annex 1

Common Code

Name

Conversion Factor

Symbol

C81

radian

rad

C25

milliradian

10–3 rad

mrad

MMT

millimetre

10–3 m

mm

HMT

hectometre

102 m

hm

KTM

kilometre

103 m

km

KMQ

kilogram per cubic metre

kg/m3

kg/m3

FAH

degree Fahrenheit

5/9×K

°F

J23

degree Fahrenheit per hour

1,543 210 × 10–4 K/s

°F/h

Specific columns of this table shall be used to create the EUInformation structure as defined by the following rules:

  • The Common Code is represented as an alphanumeric variable length of 3 characters. It shall be used for the EUInformation.unitId. The following pseudo code specifies the algorithm to convert the Common Code into an Int32 as needed for EUInformation.unitId:

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 EUInformation.namespaceUri shall be http://www.opcfoundation.org/UA/units/un/cefact.

NOTE  It will be advantegous to use Recommendation N°. 20 as specified, 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 namespaceUri in EUInformation.namespaceUri.

This structure defines float IEEE 32 bits complex value. Its elements are defined in Table 19.

Table 19 – 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 20

Table 20 – ComplexNumberType definition

Attributes

Value

BrowseName

ComplexNumberType

This structure defines double IEEE 64 bits complex value. Its elements are defined in Table 21.

Table 21 – 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 22.

Table 22 – DoubleComplexNumberType definition

Attributes

Value

BrowseName

DoubleComplexNumberType

This structure defines the information for auxiliary axis for ArrayItemType Variables.

There are three typical uses of this structure:

  1. 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.
  2. 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.
  3. 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 23.

Table 23 – 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

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 24.

Table 24 – AxisScaleEnumeration values

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 25.

Table 25 – AxisScaleEnumeration definition

Attributes

Value

BrowseName

AxisScaleEnumeration

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 26.

Table 26 – 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 27.

Table 27 – XVType definition

Attributes

Value

BrowseName

XVType