AutomationView Documentation

RS (Reset-Set Flip-Flop (Reset-Dominant))

A reset-dominant flip-flop that latches FALSE when the reset input is active.


Description

The RS instruction implements a reset-dominant flip-flop, as defined in IEC 61131-3. It has two inputs: Reset (R) and Set (S). When both inputs are TRUE simultaneously, the Reset input wins and the output is FALSE.

Behavior summary:

Use RS when the "off" condition must take priority over the "on" condition, which is common in safety-critical applications where stopping must always override starting.

For safety-critical outputs (e.g., emergency stop), RS (reset-dominant) is generally the safer choice.


Syntax

RS requires both operands. Without them, S and R both default to FALSE and the latch never moves. The Sequence visual editor and the runtime both warn when operands are missing.

Syntax

Sequence Visual Editor

Action fault_latch with the RS instruction and the fault_detected and fault_ack operand chips
The first chip is the set input, the second the dominant reset 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(
            "latch_var",
            "Reset-dominant latch driven by start/stop buttons",
            instruction=ActionInstruction.RS,
            operands=[
                ActionOperand("start_btn"),
                ActionOperand("stop_btn"),
            ],
        )

See Also