Back to FBD reference

Memory

SR

Set-dominant latch

The SR block stores Q between scans. Input S sets the state, while input R resets it only when set is not active.

Typical FBD symbol

S
R
SR
Q
Typical FBD symbol for SR

Inputs

NameTypeRequiredDescription
SBOOLYesSet for Q. This input has priority over reset.
RBOOLYesReset for Q when set is not active.

Outputs

NameTypeRequiredDescription
QBOOLYesThe retained boolean state.

Stateful

Yes, the block keeps internal state between scans.

Behavior rule

Q = S OR (previousQ AND NOT R)

Practical use

  • capturing an event with set priority;

What to watch

  • If S and R are TRUE at the same time, set has priority, so Q = TRUE.
  • Do not confuse it with RS: RS gives priority to reset when S and R are both TRUE.

Related blocks