Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

F_TRIG

Falling edge detector. Output Q is TRUE for one scan cycle when the input CLK transitions from TRUE to FALSE.

IEC 61131-3

Section 2.5.2.3.2

Support

Supported

Inputs

Name

Type

Description

CLK

BOOL

Signal to monitor for falling edge

Outputs

Name

Type

Description

Q

BOOL

Edge output (TRUE for one scan on falling edge)

Behavior

The function block stores the previous value of CLK. When CLK transitions from TRUE to FALSE, the output Q is set to TRUE for one scan cycle. On all subsequent scans where CLK remains FALSE, Q is FALSE. When CLK is TRUE, Q is always FALSE.

Example

This example shows that no falling edge is detected when CLK starts FALSE (no transition occurred — the default was already FALSE).

See Also

  • R_TRIG — rising edge detector