Glossary · PLC and control programming
Set-reset flip-flop
Also known as: SR flip-flop, RS flip-flop, Bistable
German: Setz-Rücksetz-Flipflop
In IEC 61131-3 programming, a set-reset flip-flop is a bistable standard function block that stores a Boolean state: SR is set-dominant and RS is reset-dominant when both inputs are TRUE.
- PLC programming
- Standards
In one sentence
A set-reset flip-flop stores a Boolean state; in IEC 61131-3, SR is set-dominant and RS is reset-dominant.
Example
An alarm memory uses an RS block: a fault sets it, the acknowledge button resets it, and if both are active, reset wins only after the fault is gone.
How it applies
- Engineering: SR and RS blocks implement latches with explicit priority. The choice of dominance is a design decision: stop and fault functions are usually reset-dominant so that a persistent start signal cannot override them.
- Programming: Ladder diagrams use set and reset coils for the same purpose. Writing the same variable with several set/reset coils in different places makes behavior hard to follow; a Cross-reference check helps.
- Safety: Latches and resets in safety logic are part of the safety function design and its validation. A standard SR block in a non-safety program does not provide a safety-rated reset, see Manual reset.
- Documentation: Where a latched state is visible to the user, such as an alarm that stays until acknowledged, describe the reset condition in the operating manual.
SR vs. RS
With both inputs TRUE, SR outputs TRUE (set dominates) and RS outputs FALSE (reset dominates). Mixing them up can turn a stop into a no-stop, so name the dominance in code comments and specifications.