Bistable Latches

The Adapnex SDK provides standard bistable blocks (latches) for maintaining binary state. These blocks allow setting a signal to true and resetting it to false using separate inputs, modeled after the IEC 61131-3 industrial standard.

These blocks are useful for building state machines, memory circuits, or simple start/stop logic where the output state must be remembered across execution cycles. Because they maintain internal state across cycles, 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 bistable latch 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

RS

Reset dominant latch

Reset input has priority when both SET and RESET are true

Safety-critical start/stop circuits

SR

Set dominant latch

Set input has priority when both SET and RESET are true

Alarm systems, latched fault indicators

Best Practices

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