F_TRIG Falling edge detector (F_TRIG)
Also called: falling edge trigger, F_TRIG block, negative edge
Q is 1 for one scan when the rung goes from 1 to 0.
What it does
The F_TRIG block detects the rung's falling edge: its output Q is 1 for exactly one scan, when the rung goes from 1 to 0.
When to use it
To act at the end of a condition: end of filling, a part leaving a sensor.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|---|
| Instance | Instance | Instance (the edge’s memory) | F_TRIG | Input | Yes | — | Instance: remembers the value of the previous scan. |
| CLK | CLK | Watched signal | BOOL | Input | Yes | Read (RT1.CLK) | Watched signal: the rung's power flow. |
| Q | Q | Pulse | BOOL | Output | No | Read (RT1.Q) | 1 for a single scan when CLK goes from 1 to 0. |
| Mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance (the edge’s memory) | F_TRIG | Input | Yes | — | Instance: remembers the value of the previous scan. |
| CLK | Watched signal | BOOL | Input | Yes | Read (RT1.CLK) | Watched signal: the rung's power flow. |
| Q | Pulse | BOOL | Output | No | Read (RT1.Q) | 1 for a single scan when CLK goes from 1 to 0. |
| Mnemonic | Name | Data type | Direction | Required | Access | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance (the edge’s memory) | F_TRIG | Input | Yes | — | Instance: remembers the value of the previous scan. |
| CLK | Watched signal | BOOL | Input | Yes | Read (RT1.CLK) | Watched signal: the rung's power flow. |
| Q | Pulse | BOOL | Output | No | Read (RT1.Q) | 1 for a single scan when CLK goes from 1 to 0. |
Readable anywhere in the program, for example RT1.Q. Writable members can be changed by the program (MOVE).
Timing diagram
Timing diagram checked against the simulator (the same engine as the editor).
Example
M1 is 1 for a single scan when S1 is released.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- Memory starts at 0: never a pulse on the first scan.
- The edge is detected on the whole rung before it.
- Each instance has its own memory.
European (IEC) and American styles
European: F_TRIG block (IEC 61131-3).
American: equivalent to an OSF with its storage bit.