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
| Name | Type | Description |
|---|---|---|
| CLK | BOOL | Input signal to monitor for falling edge |
Outputs
| Name | Type | Description |
|---|---|---|
| Q | BOOL | TRUE for one scan on falling edge of CLK |
Timing Diagram
CLK: ___/‾‾‾‾‾‾‾‾‾\___/‾‾‾‾\___
Q: ______________/‾\________/‾\
^one scan ^one scanLadder 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
Siemens (TIA Portal)
Use F_TRIG instruction or N (negative edge) contact in TIA Portal.
Allen-Bradley (Studio 5000)
Use OSF (One-Shot Falling) instruction in Studio 5000.
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.
Related Function Blocks
R_TRIG (Rising Edge Detection)
Detects FALSE-to-TRUE transition, outputs single-scan pulse on rising edge.
View Reference →SR (Set-Reset Flip-Flop, Set Dominant)
Set-dominant flip-flop: output latches TRUE on set, cleared by reset. Set wins if both active.
View Reference →RS (Reset-Set Flip-Flop, Reset Dominant)
Reset-dominant flip-flop: reset wins if both set and reset are active simultaneously.
View Reference →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.
Instant download - 30-day money-back guarantee - Use on unlimited projects