AutomationView Documentation

F_TRIG (Falling Edge Detection)

Detects a falling edge (TRUE-to-FALSE transition) on a monitored input and produces a single-cycle pulse on the action's output variable.


Description

The F_TRIG instruction watches the boolean variable passed as its operand for a falling edge (the moment that signal transitions from TRUE to FALSE). When the edge occurs, the action's name (the output variable) is set to TRUE for exactly one scan cycle, then returns to FALSE.

Two distinct variables are involved:

This is useful when you need to react to a signal turning off, such as detecting when a button is released or when a sensor loses its target.

Typical uses include:

F_TRIG requires the input operand. Without it, the instruction has nothing to compare against and the output never pulses. The Sequence visual editor and the runtime both warn when the operand is missing.


Syntax

Syntax

Sequence Visual Editor

Action release_edge with the F_TRIG instruction watching start_pb
The operand chip is the watched CLK input.

Python

from automation_machine import Sequence, StepType, ActionInstruction, ActionOperand

class Example(Sequence):
    def setup(self):
        step = self.add_step(StepType.INITIAL, name="StepName")
        step.add_action(
            "edge_var",
            "Falling edge of input_signal",
            instruction=ActionInstruction.F_TRIG,
            operands=[ActionOperand("input_signal")],
        )

See Also