A reset-dominant flip-flop that latches FALSE when the reset input is active.
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:
TRUEFALSEFALSE (reset-dominant)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.
ActionQualifier enum (default: ActionQualifier.N)ActionInstruction.RS{GIF:HERE} - Screenshot showing a step named "StepName" with an action on "variable_name" using the RS (reset-set flip-flop) instruction in the visual sequence editor
from automation_machine import Sequence, StepType, ActionInstruction
class Example(Sequence):
def setup(self):
step = self.add_step(StepType.INITIAL, name="StepName")
step.add_action("variable_name", "Description", instruction=ActionInstruction.RS)