Triggers & Edge Detection

The Adapnex SDK provides standard blocks for detecting state transitions (edges) in boolean signals. These blocks are modeled after the IEC 61131-3 industrial standard.

These blocks are useful when an action should be performed exactly once when a signal changes state, rather than continuously while the signal remains in that state. Because they maintain internal memory of the previous signal state, they are designed to be instantiated as member variables of a Task and invoked cyclically within Update().

Overview of Available Blocks

The table below summarizes the edge detection blocks available in the SDK. Detailed parameter tables and runnable examples for each block are documented on their respective reference pages linked in the table.

Block Type Behavior Summary Common Use Case

R_TRIG

Rising edge detector

Emits a single-cycle pulse when CLK transitions from false to true

Push buttons, item counters

F_TRIG

Falling edge detector

Emits a single-cycle pulse when CLK transitions from true to false

Part clearance, machine stopping

Best Practices

  1. Task Member Instantiation: Always declare trigger blocks as member variables of your Task class. Function blocks maintain internal state across cycles and will reset every cycle if declared locally inside Update().