F_TRIGΒΆ
Provided by Standard Library.
Function block detecting a falling edge.
Inputs:
CLK: BOOL; incoming boolean signal to be checked for rising edge
Outputs:
Q: BOOL; becomes TRUE if a falling edge occurs at CLK
The output Q and an internal boolean help variable M will remain FALSE as long as the input variable CLK returns TRUE. As soon as CLK returns FALSE, Q will first return TRUE, then M will be set to TRUE. This means each time the function is called up, Q first will be set TRUE, then return FALSE, followed by a falling edge in CLK.
(Q := CLK AND NOT M;
(Q := NOT CLK AND NOT M;
M := NOT CLK;)
Declaration example:\ \ \ \
FTRIGInst : F_TRIG ;
Example in IL:\ \ \ \
Example in FBD:\ \ \ \
Example in ST:\ \ \ \
FTRIGInst(CLK:= VarBOOL1);
VarBOOL2 := FTRIGInst.Q;