F_TRIG

The F_TRIG function block is a detector for a falling edge.
As long as the CLK input variable = TRUE, the Q output = FALSE. As soon as CLK = FALSE, Q is set to TRUE for one cycle. This means that each time the function is called, Q returns FALSE until CLK has a rising edge and then a falling edge.
Inputs
VAR_INPUT
CLK : BOOL; (* Signal to detect *)
END_VARName | Type | Description |
|---|---|---|
CLK | BOOL | Boolean signal to be checked |
Outputs
VAR_OUTPUT
Q : BOOL; (* Edge detected *)
END_VARName | Type | Description |
|---|---|---|
Q | BOOL | TRUE for a falling edge at the CLK input (for one cycle) |
Requirements
Development environment | Target platform | PLC library to include |
|---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |