Edge

Description: Performs a test for a rising or falling edge.
Returns: Boolean
Usage: Steady State only.
Function Groups: Generic Math,  Variable
Related to: Change
Format: Edge(Value, Mode)
Parameters:  
Value
Required. Any expression giving a numeric status value to be tested. It is interpreted as true if it is non-zero, and false if it is zero.
Mode
Required. Dictates whether the change from false to true or true to false is tested. If it is 0, a true to false (a falling edge) is tested. If it is 1, a false to true (a rising edge) is tested.
Comments: Edge is one of the Latching and Resetting functions. Use accordingly.

Example 1:

If Edge(Var1 > 2, 1) NextState;

Example 2:

Latch(Edge(Variable("Tag_1")\Value > 10, 1), 
TimeOut(Watch(0, Value), 2)) ?  1 : 0

When the value of the tag, ‘Tag_1’ changes from less than 10 to greater than 10, the value of the expression will change to 1.

The change in the expression value will start the Timeout function, which will reset the expression after 2 seconds and allow the process to repeat the next time Tag_1’s value increases past 10.

Latching and Resetting Functions