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 mnemonicAmerican mnemonicNameData typeDirectionRequiredAccessMeaning
InstanceInstanceInstance (the edge’s memory)F_TRIGInputYes—Instance: remembers the value of the previous scan.
CLKCLKWatched signalBOOLInputYesRead (RT1.CLK)Watched signal: the rung's power flow.
QQPulseBOOLOutputNoRead (RT1.Q)1 for a single scan when CLK goes from 1 to 0.
MnemonicNameData typeDirectionRequiredAccessMeaning
InstanceInstance (the edge’s memory)F_TRIGInputYes—Instance: remembers the value of the previous scan.
CLKWatched signalBOOLInputYesRead (RT1.CLK)Watched signal: the rung's power flow.
QPulseBOOLOutputNoRead (RT1.Q)1 for a single scan when CLK goes from 1 to 0.
MnemonicNameData typeDirectionRequiredAccessMeaning
InstanceInstance (the edge’s memory)F_TRIGInputYes—Instance: remembers the value of the previous scan.
CLKWatched signalBOOLInputYesRead (RT1.CLK)Watched signal: the rung's power flow.
QPulseBOOLOutputNoRead (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

CLKQ0123456789101112scans

Timing diagram checked against the simulator (the same engine as the editor).

Example

European style
American style

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

European (IEC) and American styles

European: F_TRIG block (IEC 61131-3).

American: equivalent to an OSF with its storage bit.

See also