Extensions.Quantities.GetDisplayUnit
Jump to navigation
Jump to search
Contents
Classification
Name | GetDisplayUnit |
Short Description | Gets the display unit of a Quantity value |
Class | Term |
Extension | OTX Quantities extension |
Group | Quantity and Unit related terms |
Exceptions | UnknownUnitException |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
UnitTerm Quantities.GetDisplayUnit(QuantityTerm quantity);
Description
The GetDisplayUnitName term will extract the display unit out of a Quantity value (e.g. "mp/h", "km/h", "h", "sec" etc.).
Return Value
The Term returns the value, see table below.
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Unit | The display unit of a Quantity value |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Quantity | Quantity | Term | - | [1] | Represents the Quantity from which the display unit will be extracted. |
OTL Examples
/// Local Declarations
Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"];
Quantities.Unit Unit1;
/// Flow
Unit1 = Quantities.GetDisplayUnit(Quantity);