Skip to main content

SF_F_TRIG (FB)

Description of the function block

Tip

The version of the function block as described here corresponds to the latest version of the function block in Version list of function blocks.

Tip

SF_F_TRIG is a function block from the SafetyStandardlibrary. It is an extension of F_TRIG, a standard IEC 61131-3 function block. The SF_F_TRIG function block contains safety-related data types (prefix: SAFE).

This function block detects a falling edge.

Figure 113. Function block: SF_F_TRIG
Function block: SF_F_TRIG


Table 91. VAR_INPUT

Name

Data Type

Initial Value

Description, parameter values

CLK

SAFEBOOL

FALSE

Input signal checked for falling edge.



Table 92. VAR_OUTPUT

Name

Data Type

Initial Value

Description, parameter values

Q

SAFEBOOL

FALSE

TRUE: Falling edge was detected on CLK.



The output Q is TRUE only if CLK = FALSE and was TRUE at the previous call of SF_ F_TRIG (falling edge). In the other cases, Q returns the value FALSE.

Special behavior of the function block in the 1st cycle

In the first cycle, SF_F_TRIG recognizes a falling edge when FALSE is applied and sets the output Q to TRUE. This behavior conforms to the F_TRIG of IEC 61131-3 from Edition 2. It therefore deviates from the behavior of the F_TRIG function block of CODESYS Standard, which complies with IEC 61131-3 Edition 1.