Sets the target boolean variable to TRUE and latches it until explicitly reset.
The SET instruction forces the target variable to TRUE when the action activates. Once set, the variable stays TRUE even after the step deactivates. The variable remains latched until a RESET instruction (or an RS/SR flip-flop) explicitly turns it off.
This is useful for signals that must remain on across multiple steps, such as alarm indicators or mode flags.
A
SETwithout a correspondingRESETsomewhere in your program means the variable will stayTRUEforever. Always plan a reset path.
ActionQualifier.S (defaults to ActionInstruction.SET)
ActionInstruction.SETis the default instruction for theActionQualifier.Squalifier and can be omitted.
{GIF:HERE} - Screenshot showing a step named "StepName" with an action on "variable_name" using the S qualifier and SET instruction in the visual sequence editor
from automation_machine import Sequence, StepType, ActionQualifier
class Example(Sequence):
def setup(self):
step = self.add_step(StepType.INITIAL, name="StepName")
step.add_action("variable_name", "Description", qualifier=ActionQualifier.S)