5.6.4 EUInformation

5.6.4.1 General

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

5.6.4.2 Extented Unit information and Quantity

Servers can enhance EUInformation by providing the Quantity and Unit model (see 6) and referencing from EUInformation instances to the appropriate instances for quantity and unit. See Figure 5 for an example.

Figure 5 – Enhanced EUInformation example
5.6.4.3 Definition of EUInformation

The EUInformation elements are defined in Table 23.

Table 23 – EUInformation DataType structure
NameTypeDescription
EUInformationstructure

namespaceUri

StringIdentifies 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

LocalizedTextThe 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

LocalizedTextContains the full name of the engineering unit such as "hour" or "meter per second".

Its representation in the AddressSpace is defined in Table 24.

Table 24 – EUInformation definition
Attribute Value
BrowseNameEUInformation
IsAbstractFalse
References NodeClass BrowseName DataType TypeDefinition Other
Subtype of Structure defined in OPC 10000-5.
Conformance Units
Base Info EUInformation
5.6.4.4 Mapping of UN/CEFACT to 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 UNECE). 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 25 contains a small excerpt of the relevant columns in the UNECE recommendation:

Table 25 – Examples from the UNECE Recommendation
Excerpt from Recommendation N°. 20, Annex 1
Common CodeNameSymbol
C81radianrad
C25milliradianmrad
MMTmillimetremm
HMThectometrehm
KMTkilometrekm
KMQkilogram per cubic metrekg/m3
FAHdegree 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:

https://reference.opcfoundation.org/files/UNECE_to_OPCUA.csv?u=http://opcfoundation.org/UA/

This mapping has been generated as follows:

		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;	}
5.6.4.5 Mapping of IEC 62720 to EUInformation

This clause specifies how to apply the Common Data Dictionary (IEC CDD) published as IEC/TS 62720 by the “International Electrotechnical Commission - IEC” to the EUInformation Structure.

The units and their identifiers, along with their relationships, is maintained in the IEC Common Data Dictionary (CDD): https://cdd.iec.ch/cdd/iec62720/iec62720.nsf/TreeFrameset. Specific units can only be found via search. A ‘*’ as search string will return all units.

Figure 6 specifies the dialog to search for units and optionally export them.

Figure 6 – Searching Units in the IEC Common Data Dictionary

Table 25 contains a small excerpt of the relevant columns in IEC 62720:

Table 26 – Examples from the IEC CDD
Excerpt of Units from IEC/TS 62720
CodeSymbolName
UAA017Ωohm
UAA033°Cdegree Celsius
UAA070μNmicronewton
UAA172Jjoule
UAA539ininch
UAB044in/s2inch per second squared
UAA497g/sgram per second

All units in the IEC CDD have been extracted and mapped to the EUInformation fields. The list is available here:

https://reference.opcfoundation.org/files/IEC62720_to_OPCUA.csv?u=http://opcfoundation.org/UA/

This mapping has been generated as follows:

	Int32 unitId = 0;	Int32 c;	for (i=0; i<6;i++)	{
		c = UnitCode[i] 0x1f;	 	unitId = unitId << 5;		unitId = unitId | c;	}