Table Of Contents

Formula Calculated Channel Options

Last Modified: June 10, 2021

Use standard math operators and functions to create variables that customize calculated channels.

All formulas must adhere to the following rules:

  • Every formula must contain a reference to at least one variable.
  • Variables must be contained in brackets. For example, [variable].
  • Element-wise calculation is done when one of the operands is a variable or the parameter is a variable.
  • Decimal separators on literal numbers must be periods. Alternative separators, such as commas, are not supported.

Refer to the following table of supported formula formats for examples that you can use to configure a calculated variable.

Formula format Description Example
[<variable>] + x Element-wise arithmetic addition [Var0] + 1
[<variable x>] + [variable y>] [Var0] + [Var1]
[<variable>] - x Element-wise arithmetic subtraction [Var0] - 1
[<variable x>] - [<variable y>] [Var0] - [Var1]
[<variable>] * x Element-wise arithmetic multiplication [Var0] * 5
[<variable x>] * [<variable y>] [Var0] * [Var1]
[<variable>] / x Element-wise arithmetic division [Var0] / 5
[<variable x>] / [<variable y>] [Var0] / [Var1]
function([<variable>]) Apply the function to the variable sin([Var0])
x + y * z / [<variable>] Arithmetic equation 2 + 3 * 4 / [Var0]
(x + y) * z / [<variable>] Arithmetic equation (2 + 3) * 4 / [Var0]
-[<variable>] Unary minus -[Var0]
+[<variable>] Unary plus (a no-op) +[Var0]
[<variable>]^x Power operator [Var0]^3
spd-note-note
Note  

The data type for all numerics is double-precision, floating-point.

Refer to the following table of supported functions and operators for examples of formula elements that you can use to configure a calculated channel.

  Formula element Definition
Supported Function sin(x) Calculates the sine of x. Enter x in radians.
cos(x) Calculates the cosine of x. Enter x in radians.
tan(x) Calculates the tangent of x. Enter x in radians.
asin(x) Calculates the inverse of sine of x. The result is in radians.
acos(x) Calculates the inverse of cosine of x. The result is in radians.
atan(x) Calculates the inverse of tangent of x. The result is in radians.
abs(x) Returns the absolute value of x.
rand() Generates a random number between 0 and 1.
exp(x) Computes the value of e raised to the x power.
sqrt(x) Calculates the square root of x.
sign(x) Returns 1 if x is greater or less than 0. Returns 0 if x is equal to 0.
int(x) Calculates the integer value of x.
Supported Operator + Addition
- Subtraction
* Multiplication
/ Division
( ) Parenthesis. The contents are evaluated first
^ Calculate the base raised to the power of the exponent

Recently Viewed Topics