The Units model describes the relations between UnitType, ServerUnitType and AlternativeUnitType.
The UnitType is the base class and defines details that are relevant of all derived types.
It is formally defined in Table 38.
Table 38 – UnitType definition
Attribute |
Value |
||||
BrowseName |
UnitType |
||||
IsAbstract |
True |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the BaseObjectType defined in OPC 10000-5 |
|||||
HasProperty |
Variable |
Symbol |
LocalizedText |
PropertyType |
M |
HasProperty |
Variable |
Description |
LocalizedText |
PropertyType |
O |
HasProperty |
Variable |
UnitSystem |
String |
PropertyType |
M |
HasProperty |
Variable |
Discipline |
String |
PropertyType |
O |
Conformance Units |
|||||
Data Access Quantities Base |
The DisplayName Attribute of each instance shall provide the name of the unit, e.g. “second”, “degree Celsius” or “square metre”. This matches the “description” field of the EUInformation structure (see 5.6.3.3).
The Symbol Property is used for the symbol of the unit (e.g. "h" for hour or "m/s" for meter per second). If no symbol is defined for the unit, the DisplayName Attribute shall be used as symbol. Symbol matches the “displayName” field of the EUInformation structure (see 5.6.3.3).
The Description Property is used to expose a more verbose explanation.
The UnitSystem Property describes the system of units (e.g. ISQ) in which the unit is specified. If any of the well known systems defined in Table 39 is used, the acronym in the column “UnitSystem” shall be used for the value of this Property.
Table 39 – Non-exhaustive list of well-known systems of units
UnitSystem |
System of units |
ISQ |
International System of Quantities (ISO/IEC 80000) Fully covers and thus replaces SI (ISO1000) |
USCS |
US Customary Unit System |
ISU |
British imperial system of units |
MSU |
Myanmar Units of measurement |
TROY |
Troy units of weight |
CGS |
centimetre–gram–second system of units |
GAUSS |
Gaussian System of units |
FPS |
foot–pound–second system of units |
Syntax References: Instances of the UnitType can identify the unit in a specific external reference work using HasDictionaryEntry References – see 6.3.2.
Instances of ServerUnitType define the units utilizes in the Server. They are assigned to the proper Quantities. EngineeringUnit Properties can refer to it. It is formally defined in Table 40.
Table 40 – ServerUnitType definition
Attribute |
Value |
||||
BrowseName |
ServerUnitType |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the UnitType |
|||||
HasComponent |
Object |
AlternativeUnits |
|
BaseObjectType |
O |
HasProperty |
Variable |
ConversionLimit |
ConversionLimitEnum |
PropertyType |
M |
HasComponent |
Object |
CoherentUnit |
|
UnitType |
O |
Conformance Units |
|||||
Data Access Quantities Base |
The optional Object AlternativeUnits contains Objects of the AlternativeUnitsType. These explicitly specify the units into which the conversion can be made.
The mandatory Property ConversionLimit indicates whether the ServerUnit may be converted. A distinction is made between NO_CONVERSION, LIMITED and UNLIMITED.
UNLIMITED means the client may perform conversions based on the rules defined by the given UnitSystem.
LIMITED conversion means that a conversion can not be performed by simply applying the rules defined by the given UnitSystem. Either only the conversions mentioned in the AlternativeUnits are to be used or the client requires application specific know-how for a conversion on his own.
NO_CONVERSION means that no conversion is allowed (e.g. for statistical values).
The CoherentUnit of a value is a derived unit that, for a given system of quantities and for a chosen set of base units, is a product of powers of base units, with the proportionality factor being one. Therefoe it shall share the same UnitSystem as the ServerUnit.
The components of the ServerUnitType have additional subcomponents which are defined in Table 41.
Table 41 – ServerUnitType Additional Subcomponents
BrowsePath |
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
AlternativeUnits |
HasComponent |
Object |
<AlternativeUnit> |
|
AlternativeUnitType |
MP |
The AlternativeUnitType describes alternative units to a ServerUnit. It is required to specify a conversion method for a value from the ServerUnit to this AlternativeUnit. It is formally defined in Table 42.
The use of conversions enables that a server and a client can work with different units and even in different systems of units. E.g. a server works with imperial units and a client uses metric units.
As a single server may distribute values to a number of clients with different needs the actual conversion has to be performed at client side.
Table 42 – AlternativeUnitType definition
Attribute |
Value |
||||
BrowseName |
AlternativeUnitType |
||||
IsAbstract |
False |
||||
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
Other |
Subtype of the UnitType |
|||||
HasProperty |
Variable |
LinearConversion |
LinearConversionDataType |
PropertyType |
O |
HasProperty |
Variable |
MathMLConversion |
String |
PropertyType |
O |
HasProperty |
Variable |
MathMLInverseConversion |
String |
PropertyType |
O |
Conformance Units |
|||||
Data Access Alternative Units |
The Server shall provide either a LinearConversion or a MathMLConversion together with a corresponding MathMLInverseConversion. It may provide Linear and MathML conversions in parallel.
The optional Property LinearConversion represents a simple conversion according to the following formula. The values(a, b, c, d) are given in a Structure as defined in the LinearConversionDataType in chapter 6.6.2. The valuex is published by the server in the named server unit andy is the value converted into the named alternative unit.
Figure 10 MathML example linear conversion
This also defines the inverse conversion to be used if a client wants to write a value to the server. The values (a, b, c, d) are given in a Structure as defined in the LinearConversionDataType in chapter 6.6.2. The valuey1 is the value that the client wants to write to the server in the named alternative unit and x1 is the value the client actually has to write to the server instead
Figure 11 MathML example inverse linear conversion
The optional Property MathMLConversion allows the specification of all kinds of conversion methods. The MathML syntax is used for this. Within the MathML expression X always stands for the value at the server side and Y for the value at the client side. An example (formula of the LinearConversion) looks as follows.