Difference between revisions of "Signal Reader Trigger Expressions"
Jump to navigation
Jump to search
Line 43: | Line 43: | ||
|- | |- | ||
!TIME_COUNTER | !TIME_COUNTER | ||
|Counts the time elapsed | |Counts the time elapsed while the supplied boolean expression has been true. You can optionally supply an expression resetting the time counter to zero. Syntax: TIME_COUNTER(expression) or TIME_COUNTER(expression, expression) | ||
|- | |- | ||
!SAMPLE_COUNTER | !SAMPLE_COUNTER | ||
|Counts the number of samples received while the boolean expression is true. Syntax: SAMPLE_COUNTER(expression) | |Counts the number of samples received while the boolean expression is true. You can optionally supply an expression resetting the time counter to zero. Syntax: SAMPLE_COUNTER(expression) or SAMPLE_COUNTER(expression, expression) | ||
|- | |- | ||
!MOVAV | !MOVAV |
Revision as of 09:27, 29 April 2021
Trigger conditions are expressions evaluated by the Signal Reader module to control when recorders are started and stopped and when measurement set-up switches are performed. Trigger conditions are boolean expressions, evaluated to either true or false. A number of operators can be combined to form the trigger expression. The allowed operators in trigger expressions are shown in the table below.
= | Tests for equality. Syntax: expression = expression |
---|---|
!= | Tests for inequality. Syntax: expression != expression |
< | Tests for left side of expression being less than right side. Syntax: expression < expression |
> | Tests for left side of expression being greater than right side. Syntax: expression > expression |
<= | Tests for left side of expression being less or equal to right side. Syntax: expression <= expression |
>= | Tests for left side of expression being greater or equal to right side. Syntax: expression >= expression |
AND | Logical conjunction between left and right side boolean expressions. Syntax: boolean expression AND boolean expression |
OR | Logical disjunction between left and right side boolean expressions. Syntax: boolean expression OR boolean expression |
CHANGE | True when the specified signal changes value by at least the specified amount. Syntax: CHANGE(Signal, amount) |
CHANGE_UP | True when the specified signal increases its value with the specified amount. Syntax: CHANGE_UP(Signal, amount) |
CHANGE_DOWN | True when the specified signal increases its value with the specified amount. Syntax: CHANGE_DOWN(Signal, amount) |
CHANGE_FROM_TO | True when the specified signal changes from the specified value to the other specified value. Syntax: CHANGE_FROM_TO(Signal, value, value) |
TIMER | Effects a delay in seconds from that the condition is fulfilled. Syntax: TIMER(expression,time) |
TIME_COUNTER | Counts the time elapsed while the supplied boolean expression has been true. You can optionally supply an expression resetting the time counter to zero. Syntax: TIME_COUNTER(expression) or TIME_COUNTER(expression, expression) |
SAMPLE_COUNTER | Counts the number of samples received while the boolean expression is true. You can optionally supply an expression resetting the time counter to zero. Syntax: SAMPLE_COUNTER(expression) or SAMPLE_COUNTER(expression, expression) |
MOVAV | Calculates a moving average over the specified signal. Syntax: MOVAV(Signal) |
ABS | Calculates the absolute value of the specified expression. Syntax: ABS(expression) |
MIN | Calculates the minimum value of two expressions. Syntax: MIN(expression, expression) |
MAX | Calculates the maximum value of two expressions. Syntax: MAX(expression, expression) |
MEAN | Calculates the mean value of two expressions. Syntax: MEAN(expression, expression) |