CODESYS F_TRIG

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.

Source checked9/9 values · 2026-10-26

Specification

2 sources
Languageiec 61131 3
CodeF TRIG
GroupTrigger
SyntaxFTRIGInst(CLK := VarBOOL1); VarBOOL2 := FTRIGInst.Q;
DialectCODESYS

Parameters

NameData typeDescription
CLKBOOLInput: Boolean signal to be checked.
QBOOLOutput: 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;
↑↓ navigate↵ openesc close