R_TRIG
Detector for a Rising Edge
VAR_INPUT
VAR_INPUT
CLK : BOOL; (* Signal to detect *)
END_VAR
VAR_OUTPUT
VAR_OUTPUT
Q : BOOL; (* Edge detected *)
END_VAR
The output Q will remain FALSE as long as the input variable CLK is FALSE. As soon as CLK returns TRUE, Q will return TRUE. This means each time the function is called up, Q will return FALSE until CLK has falling edge followed by a rising edge.
Requirements
Development environment |
Target system type |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.0.0 |
PC or CX (x86) |
Tc2_Standard |