# CODESYS F_TRIG

Instructions · `F_TRIG` · verification: source checked

F_TRIG is a function block that detects a falling edge of a Boolean signal. It has a Boolean input CLK and a Boolean output Q; Q becomes TRUE when a falling edge is detected. The source shows Structured Text declaration and call examples using an instance of the function block.

## Specification

| Property | Value |
|---|---|
| Language | iec 61131 3 |
| Code | F TRIG |
| Group | Trigger |
| Syntax | FTRIGInst(CLK := VarBOOL1); VarBOOL2 := FTRIGInst.Q; |
| Dialect | CODESYS |

### Parameters

| Name | Data type | Description |
|---|---|---|
| CLK | BOOL | Input: Boolean signal to be checked. |
| Q | BOOL | Output: TRUE when a falling edge is detected. |

## Study notes

- Example declaration: FTRIGInst : F_TRIG;
- The source shows the call FTRIGInst(CLK := VarBOOL1); and reading the result as VarBOOL2 := FTRIGInst.Q;

## Sources

1. [Beckhoff Information System](https://infosys.beckhoff.com/content/1033/tcplclib_tc2_standard/74390027.html) (accessed 2026-10-26)
2. [CODESYS Group](https://content.helpme-codesys.com/en/libs/Standard/Current/Trigger/F_TRIG.html) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/iec-f-trig  
JSON: https://machineschema.com/instruction/iec-f-trig.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
