Difference between revisions of "Extensions.Quantities.Negation"
Jump to navigation
Jump to search
Line 34: | Line 34: | ||
== See also == | == See also == | ||
− | [[Extensions.Quantities.Addition|Addition]] <br/> | + | [[Extensions.Quantities.Conversions|Conversions]] <br/> |
+ | [[Extensions.Quantities.Addition|Addition]] <br/> | ||
[[Extensions.Quantities.Subtraction|Subtraction]] <br/> | [[Extensions.Quantities.Subtraction|Subtraction]] <br/> | ||
[[Extensions.Quantities.Multiplication|Multiplication]] <br/> | [[Extensions.Quantities.Multiplication|Multiplication]] <br/> | ||
− | [[Extensions.Quantities.Division|Division]]<br/> | + | [[Extensions.Quantities.Division|Division]] <br/> |
− | [[Extensions.Quantities.Modulo|Modulo]]<br/> | + | [[Extensions.Quantities.Modulo|Modulo]] <br/> |
− | [[Extensions.Quantities.AbsoluteValue|Absolute Value]]<br/> | + | [[Extensions.Quantities.AbsoluteValue|Absolute Value]] <br/> |
− | <!--[[Extensions.Quantities.Negation|Negation]]<br/>--> | + | <!--[[Extensions.Quantities.Negation|Negation]] <br/>--> |
+ | [[Extensions.Quantities.RelationalOperations|Relational Operations]] <br/> | ||
+ | [[Extensions.Quantities.OtherOperations|Other Operations]] |
Latest revision as of 03:30, 26 June 2019
Contents
Classification
Name | Negation |
Short Description | Returns the value of the numeric quantity with inverted sign |
Class | Operations |
Extension | OTX Quantities extension |
Group | Overloading semantics |
Exceptions | - |
Checker Rules | - |
Standard Compliant | Yes |
OTL Syntax
QuantityVariable = Negate(QuantityTerm);
Description
When the negation is computed from a Quantity, the display unit of the resulting Quantity should be set to the SI base unit corresponding to the physical dimension of the original Quantity. Furthermore, the display precision of the resulting Quantity shall be equal to the display precision of the original Quantity. First the computation to SI Unit is done, and secondly the math function is calculated.
Example: -(-10°C) transform to SI -(263 K) Result: -263 K
Return Value
The Term returns the value, see table below.
![]()
In OTX, Terms are categorized according to its return data type!
Data Type | Description |
Quantity | The result of the negation of a numeric quantity (NumericQuantity) |
Properties
Name | Data Type | Class | Default | Cardinality | Description |
QuantityTerm | Quantity | Term | - | [1] | The numeric Quantity term whose negation shall be returned |
OTL Examples
/// Local Declarations
Quantities.Quantity Quantity;
/// Flow
Quantity = Negate(-10 [@Unit, "BL_DataLibraMIB.odx", "°C"]);
See also
Conversions
Addition
Subtraction
Multiplication
Division
Modulo
Absolute Value
Relational Operations
Other Operations