Special expressions

From WICE Wiki v2.99
Revision as of 11:06, 9 September 2026 by Mathias (talk | contribs) (Created page with "The following special expressions are supported in User Defined signals. 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. {|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The following special expressions are supported in User Defined signals. 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.

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)
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)
NO_SIGNAL True when the specified signal has not appeared for at least the specified number of seconds. Syntax: NO_SIGNAL('Signal', 'Numeric Value')
TIME_SINCE_UPDATE Gives the time in seconds since the specified signal was last updated. Syntax: TIME_SINCE_UPDATE('Signal')
IF-THEN-ELSE Conditional. Syntax: IF boolean expression THEN expression ELSE expression