Back to FBD referenceTypical FBD symbol for SR
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
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| S | BOOL | Yes | Set for Q. This input has priority over reset. |
| R | BOOL | Yes | Reset for Q when set is not active. |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| Q | BOOL | Yes | The 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.