Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
F_TRIG¶
Falling edge detector. Output Q is TRUE for one scan cycle when the
input CLK transitions from TRUE to FALSE.
IEC 61131-3 |
Section 2.5.2.3.2 |
Support |
Not yet supported |
Inputs¶
Name |
Type |
Description |
|---|---|---|
|
|
Signal to monitor for falling edge |
Outputs¶
Name |
Type |
Description |
|---|---|---|
|
|
Edge output (TRUE for one scan on falling edge) |
Behavior¶
The function block stores the previous value of CLK. When CLK
transitions from TRUE to FALSE, the output Q is set to TRUE
for one scan cycle. On all subsequent scans where CLK remains FALSE,
Q is FALSE. When CLK is TRUE, Q is always FALSE.
Example¶
VAR
edge1 : F_TRIG;
button : BOOL;
released : BOOL;
END_VAR
edge1(CLK := button);
released := edge1.Q;
See Also¶
R_TRIG — rising edge detector