Skip to main content

expression

Syntax

- expression: expression

Description

The expression operation is one of the few operations that can be used to start the chain of operations that make up a variable.

An expression operation applies a mathematical (or in limited cases, non-mathematical) expression to its input. The result of the calculated expression is the output of the operation.

Expression values recognize the special keyword this, which represents to the value input from the previous operation. This keyword is not available if the expression is the first operation in the variable.

Other valid identifiers in the configuration, which could come from sources or other variable definitions, can also be used in expressions.

See the related Expression support document for the full capability of expressions.

Examples

  var1:
- expression: AIN0 / 10

var2:
- source: AIN0
- expression: this * 9 / 5 + 32
info

In the above example, AIN0 is an identifier available in LabJack data sources.