Difference between revisions of "Signal Reader Trigger Expressions"
Jump to navigation
Jump to search
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Trigger conditions are expressions evaluated by the Signal | 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 | 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. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 31: | Line 31: | ||
|- | |- | ||
!CHANGE_UP | !CHANGE_UP | ||
|True when the specified signal increases its value with the specified amount. Syntax: CHANGE_UP(Signal, amount) | |True when the specified signal increases its value with at least the specified amount. Syntax: CHANGE_UP(Signal, amount) | ||
|- | |- | ||
!CHANGE_DOWN | !CHANGE_DOWN | ||
|True when the specified signal increases its value | |True when the specified signal decreases its value with at least the specified amount. Syntax: CHANGE_DOWN(Signal, amount) | ||
|- | |||
!CHANGE_BY | |||
|True when the specified signal changes value by exactly the specified amount. Syntax: CHANGE_BY(Signal, amount) | |||
|- | |||
!CHANGE_UP_BY | |||
|True when the specified signal increases its value by exactly the specified amount. Syntax: CHANGE_UP_BY(Signal, amount) | |||
|- | |||
!CHANGE_DOWN_BY | |||
|True when the specified signal decreases its value by exactly the specified amount. Syntax: CHANGE_DOWN_BY(Signal, amount) | |||
|- | |- | ||
!CHANGE_FROM_TO | !CHANGE_FROM_TO | ||
Line 40: | Line 49: | ||
|- | |- | ||
!TIMER | !TIMER | ||
|Effects a delay in seconds from that the condition is fulfilled. Syntax: | |Effects a delay in seconds from that the specified signal is greater than zero. Syntax: TIMER(signal, time) | ||
|- | |||
!EXPR_TIMER | |||
|Effects a delay in seconds from that the condition is fulfilled. Syntax: EXPR_TIMER(expression, time) | |||
|- | |- | ||
!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 | |||
|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) | |||
|- | |||
!EVERY | |||
|Repeatedly becomes true after a time interval, specified in seconds, has elapsed. Syntax: EVERY(time) | |||
|- | |||
!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) | |||
|- | |||
!LOSS_OF_SIGNAL | |||
|True when the specified signal disappears for the specified number of seconds. Syntax: LOSS_OF_SIGNAL(Signal, seconds) | |||
|} | |} |
Latest revision as of 12:39, 15 September 2022
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 at least the specified amount. Syntax: CHANGE_UP(Signal, amount) |
CHANGE_DOWN | True when the specified signal decreases its value with at least the specified amount. Syntax: CHANGE_DOWN(Signal, amount) |
CHANGE_BY | True when the specified signal changes value by exactly the specified amount. Syntax: CHANGE_BY(Signal, amount) |
CHANGE_UP_BY | True when the specified signal increases its value by exactly the specified amount. Syntax: CHANGE_UP_BY(Signal, amount) |
CHANGE_DOWN_BY | True when the specified signal decreases its value by exactly the specified amount. Syntax: CHANGE_DOWN_BY(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 specified signal is greater than zero. Syntax: TIMER(signal, time) |
EXPR_TIMER | Effects a delay in seconds from that the condition is fulfilled. Syntax: EXPR_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) |
EVERY | Repeatedly becomes true after a time interval, specified in seconds, has elapsed. Syntax: EVERY(time) |
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) |
LOSS_OF_SIGNAL | True when the specified signal disappears for the specified number of seconds. Syntax: LOSS_OF_SIGNAL(Signal, seconds) |