Difference between revisions of "Extensions.Quantities.GetDisplayValue"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
== OTL Syntax == | == OTL Syntax == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | /// Local Declarations | |
+ | Float FloatVariable; | ||
+ | /// Flow | ||
+ | FloatVariable = Quantities.GetDisplayValue(QuantityTerm); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 21: | Line 24: | ||
== OTL Examples == | == OTL Examples == | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | /// Local Declarations | ||
+ | |||
Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"]; | Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"]; | ||
Float Float1; | Float Float1; |
Revision as of 08:02, 25 October 2018
Contents
Classification
Name | GetDisplayValue |
Short Description | Floating point numeric value |
Class | Term |
Extension | OTX Quantities extension |
Group | Quantity and Unit related terms |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
/// Local Declarations
Float FloatVariable;
/// Flow
FloatVariable = Quantities.GetDisplayValue(QuantityTerm);
Description
The GetDisplayValue term shall return the (dimensionless) Float value of a Quantity according to the Quantity's display unit.
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Float | The (dimensionless) float value of a Quantity. |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
Quantity | Quantity | Term | - | [1] | Represents the Quantity from which the numeral value shall be extracted. |
OTL Examples
/// Local Declarations
Quantities.Quantity Quantity = 12.44 [@Unit, "BL_DataLibraMIB.odx", "km/h"];
Float Float1;
/// Flow
Float1 = Quantities.GetDisplayValue(Quantity);