Detects value changes from TRUE to FALSE of the parameter signal; if this change is detected, the output value of the parameter detected will be TRUE until the next call of this instance.
In all other cases, the parameter detected will be FALSE.
Parameters:
| Name | Type | Section | Description |
|---|---|---|---|
| signal | BOOL |
Input | Signal to be monitored. |
| detected | BOOL |
Output | Result of edge evaluation. |
Example:
USING System.EdgeDetection;
PROGRAM SampleProgram
VAR_EXTERNAL
sensor : BOOL;
END_VAR
VAR
fallingEdge : FallingEdge;
END_VAR
fallingEdge(signal := sensor);
IF fallingEdge.detected THEN
; // do something
END_IF;
END_PROGRAM