EDGE.DETECT
Detects if the result of a given condition changed from FALSE to TRUE. This functions detects if a given condition evaluates from FALSE to TRUE. Only in this case TRUE is returned. In all other cases, i.e. TRUE to FALSE, FALSE to FALSE or TRUE to TRUE, EDGE.DETECT returns FALSE. If the function is processed for the first time it is assumed that a previous condition result was FALSE. That means that if the condition immediately evaluates to TRUE, this function returns TRUE. The behaviour of this function can be influenced by two optional parameters, namely Period and Delay. Period specifies for how long this function still returns TRUE, even if no changes were detected. On the other hand Delay specifies for how long this function returns FALSE, after a change was detected. The default value of both parameters is 0, meaning they have no effect. If both parameters are set and greater zero, Period starts after Delay. It is not recommended to use EDGE.DETECT within another function.
Syntax
=EDGE.DETECT(Condition, [Period], [Delay])
Arguments
Name | Type | Description |
---|---|---|
Condition | Number or Formula | Value or formula that returns a boolean value. |
Period (optional) | Number | Time in seconds, where the result of this formula still is TRUE. Starting after an optional delay. Default value: 0 |
Delay (optional) | Number | Delay in seconds, where the result of this formula still is FALSE even if condition change was detected. Default value: 0 |
Return
Type | Description |
---|---|
Boolean | TRUE, if condition result changes from FALSE to TRUE or FALSE otherwise. |
Examples
Formula | Result | Comment |
---|---|---|
| TRUE | period has no effect |
| TRUE | returns TRUE for all cycles which run within next second |
| FALSE | returns TRUE after a delay of 1 second and then keeps returning TRUE for one second |