Learn PLCs free
Bistables & Edge DetectionBeginnerIEC 61131-3

F_TRIG (Falling Edge Detection)

Detects TRUE-to-FALSE transition, outputs single-scan pulse on falling edge.

The F_TRIG (Falling Edge Trigger) function block detects a TRUE-to-FALSE transition on its input (CLK). The output (Q) is TRUE for exactly one PLC scan cycle when the falling edge occurs. F_TRIG is the complement of R_TRIG and is used when actions need to be triggered on signal de-activation, such as detecting when a button is released, when a sensor loses its target, or when a process condition ends.

Parameters

Inputs

NameTypeDescription
CLKBOOLInput signal to monitor for falling edge

Outputs

NameTypeDescription
QBOOLTRUE for one scan on falling edge of CLK

Timing Diagram

CLK: ___/‾‾‾‾‾‾‾‾‾\___/‾‾‾‾\___
Q:   ______________/‾\________/‾\
                   ^one scan  ^one scan

Ladder Logic Example

// Ladder Logic - F_TRIG (Button Release Detection)
//
// |----[ Button ]----[F_TRIG Release_Detect]----|
// |                  CLK: Button                |
// |                  Q:   Button_Released        |
//
// |----[ Button_Released ]----( Log_Event )------|

Structured Text Example

VAR
    Release_Detect : F_TRIG;
    Button : BOOL;
    Button_Released : BOOL;
END_VAR

Release_Detect(CLK := Button);
Button_Released := Release_Detect.Q;

20 Production-Ready Ladder Logic Templates

Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use F_TRIG instruction or N (negative edge) contact in TIA Portal.

AB

Allen-Bradley (Studio 5000)

Use OSF (One-Shot Falling) instruction in Studio 5000.

C

CODESYS

Standard F_TRIG in Standard library.

Common Applications

  • Button release detection
  • Sensor target lost event
  • Process completion trigger
  • Falling edge counting
  • De-energize event logging

Common Mistakes to Avoid

  • Confusing with R_TRIG behavior
  • Not using separate instances for each signal

Frequently Asked Questions

What is F_TRIG (Falling Edge Detection) in PLC programming?

Detects TRUE-to-FALSE transition, outputs single-scan pulse on falling edge. The F_TRIG (Falling Edge Trigger) function block detects a TRUE-to-FALSE transition on its input (CLK). The output (Q) is TRUE for exactly one PLC scan cycle when the falling edge occurs.

What are common applications of F_TRIG (Falling Edge Detection)?

F_TRIG (Falling Edge Detection) is commonly used for: Button release detection, Sensor target lost event, Process completion trigger, Falling edge counting, De-energize event logging.

How do I use F_TRIG (Falling Edge Detection) in different PLC platforms?

Siemens: Use F_TRIG instruction or N (negative edge) contact in TIA Portal. Allen-Bradley: Use OSF (One-Shot Falling) instruction in Studio 5000. CODESYS: Standard F_TRIG in Standard library.

Stop Writing Ladder Logic From Scratch

Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →