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

Table 16EUInformationDataType 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 unitIdis not available.

displayName

LocalizedText

The displayNameof 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 AddressSpaceis defined in Table 17

Table 17EUInformationdefinition

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 18contains 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–3rad

mrad

MMT

millimetre

10–3m

mm

HMT

hectometre

102m

hm

KTM

kilometre

103m

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–4K/s

°F/h

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

  • The Common Codeis 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.namespaceUrishall 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 EUInformationstructure has been defined such that other standards bodies can incorporate their engineering unit definitions into OPC UA. If Serversuse such an approach then they shall identify this standards body by using a proper namespaceUriin EUInformation.namespaceUri.