With the calculation data pipe, incoming data can be used to perform calculations with a user specified mathematical expression. The outcome will be written to a destination meter.

The name of each parameter can be freely chosen and used in the expression.
The expression will constantly be evaluated based on the test values specified in the Test values field on the right side of the parameter list. The outcome of the parameters in combination with the expression will be displayed in the Expression outcome field. The expression should be valid to be able to save the data pipe.
Parameter pre- or postfixes
By using pre- and postfixes in combination with the parameter name, additional calculation values of each parameter can be used.
| Keyword | Pre/Post | Description |
|---|---|---|
| previous_ | prefix | Use the parameter’s previous value in a calculation |
| _epoch | postfix | Us the parameter’s date-time in the calculation. The date-time is expressed as the number of seconds since January first 1970 in the UTC time zone. |
Examples
Following examples are based on a calculation parameter with name X.
| Example | Description |
|---|---|
| previous_X | The previous value of parameter X. |
| X_epoch | The number of seconds of current value since January first 1970 in the UTC time zone. |
| previous_X_epoch | The number of seconds of previous value since January first 1970 in the UTC time zone. |
Supported operators
| Operator | Description |
|---|---|
| + | Additive operator |
| – | Subtraction operator |
| * | Multiplication operator |
| / | Division operator |
| % | Remainder operator (Modulo) |
| ^ | Power operator |
Supported boolean operators
| Operator | Description |
|---|---|
| = | Equals |
| == | Equals |
| != | Not equals |
| <> | Not equals |
| < | Less than |
| <= | Less than or equal |
| > | Greater than |
| >= | Greater than or equal |
| && | Boolean and |
| || | Boolean or |
Supported functions
| Function | Description |
|---|---|
| NOT(expression) | Boolean negation, 1 (means true) if the expression is not zero |
| IF(condition,if_true,if_false) | Returns one value if the condition evaluates to true or the other if it evaluates to false |
| RANDOM() | Produces a random number between 0 and 1 |
| MIN(e1,e2, …) | Returns the smallest of the given expressions |
| MAX(e1,e2, …) | Returns the biggest of the given expressions |
| ABS(expression) | Returns the absolute (non-negative) value of the expression |
| ROUND(expression,prec.) | Rounds a value to a certain number of digits, uses the current rounding mode |
| FLOOR(expression) | Rounds the value down to the nearest integer |
| CEILING(expression) | Rounds the value up to the nearest integer |
| LOG(expression) | Returns the natural logarithm (base e) of an expression |
| LOG10(expression) | Returns the common logarithm (base 10) of an expression |
| SQRT(expression) | Returns the square root of an expression |
| SIN(expression) | Returns the trigonometric sine of an angle (in degrees) |
| COS(expression) | Returns the trigonometric cosine of an angle (in degrees) |
| TAN(expression) | Returns the trigonometric tangens of an angle (in degrees) |
| COT(expression) | Returns the trigonometric cotangens of an angle (in degrees) |
| ASIN(expression) | Returns the angle of asin (in degrees) |
| ACOS(expression) | Returns the angle of acos (in degrees) |
| ATAN(expression) | Returns the angle of atan (in degrees) |
| ACOT(expression) | Returns the angle of acot (in degrees) |
| ATAN2(y,x) | Returns the angle of atan2 (in degrees) |
| SINH(expression) | Returns the hyperbolic sine of a value |
| COSH(expression) | Returns the hyperbolic cosine of a value |
| TANH(expression) | Returns the hyperbolic tangens of a value |
| COTH(expression) | Returns the hyperbolic cotangens of a value |
| SEC(expression) | Returns the secant (in degrees) |
| CSC(expression) | Returns the cosecant (in degrees) |
| SECH(expression) | Returns the hyperbolic secant (in degrees) |
| CSCH(expression) | Returns the hyperbolic cosecant (in degrees) |
| ASINH(expression) | Returns the angle of hyperbolic sine (in degrees) |
| ACOSH(expression) | Returns the angle of hyperbolic cosine (in degrees) |
| ATANH(expression) | Returns the angle of hyperbolic tangens of a value |
| RAD(expression) | Converts an angle measured in degrees to an approximately equivalent angle measured in radians |
| DEG(expression) | Converts an angle measured in radians to an approximately equivalent angle measured in degrees |
Supported constants
| Constant | Description |
|---|---|
| e | The value of e, exact to 70 digits |
| PI | The value of PI, exact to 100 digits |
| TRUE | The value one |
| FALSE | The value zero |
| NULL | The null value |