F_TRIG — Falling-edge trigger

Pin layout

DirectionNameTypeDescription
InputCLKBOOLSignal to edge-detect
OutputQBOOLTRUE for one scan after CLK falls TRUE→FALSE

Semantics

Q := NOT CLK AND _previousCLK
_previousCLK := CLK

Internal _previousCLK starts as FALSE. So the first call where CLK = TRUE does not fire Q (no previous TRUE), but the next call where CLK = FALSE while _previousCLK = TRUE fires Q for one scan.

Example

VAR
    edgeFall : F_TRIG;
END_VAR

edgeFall(CLK := xButton);

IF edgeFall.Q THEN
    DoOnRelease();
END_IF;

Symmetric to R_TRIG — same usage pattern, only the edge direction differs.

IEC reference

IEC 61131-3 third edition (2013), Annex F.5.2.

matiec conformance

Implemented per the standard.