SR is a standard function block that implements a bistable set-dominant latch. The output Q1 is set to TRUE by the input SET1 and reset to FALSE by the input RESET, with SET1 taking priority. The implementation is the Boolean expression Q1 := SET1 OR (NOT RESET AND Q1).
| Language | iec 61131 3 |
|---|---|
| Code | SR |
| Group | Bistable Function Blocks |
| Syntax | SRInst(SET1 := VarBOOL1, RESET := VarBOOL2) |
| Dialect | CODESYS |
| Name | Data type | Description |
|---|---|---|
| SET1 | BOOL | Sets the output Q1 to TRUE (dominant) |
| RESET | BOOL | Resets the output Q1 to FALSE |
| Q1 | BOOL | Output value |