Type
| Function blockAvailable as standard (non-safety-related) and safety-related type (*_S). For the safety-related type, the safety-related data types (SAFE*) are expected at the formal parameters. |
Description
| The RS function block realizes a latching relay with resetting priority over setting. A latching relay remains in its last state when power is switched off. The Q1 output is set with a transition from FALSE to TRUE at the SET input. Q1 remains TRUE until the RESET1 input switches from FALSE to TRUE. If SET and RESET1 are TRUE, the RESET1 input has priority.If the function block is called for the first time, Q1 is FALSE. |
Notes
|
- All parameters can be negated.Note: The negation of formal parameters is not supported in safety-related code (SNOLD).
- Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
|
Parameters
| Inputs
SET
Data type: | (SAFE)BOOL |
Description: | If TRUE, Q1 is set. |
RESET1
Data type: | (SAFE)BOOL |
Description: | If TRUE, Q1 is reset dominant. |
Output
Q1
Data type: | (SAFE)BOOL |
Description: | Output value. |
|
Timing diagram
| RS timing diagram
0 | The inputs SET and RESET1 are FALSE. Q1 is also FALSE. |
1 | SET switches from FALSE to TRUE, Q1 is set to TRUE. |
2 | SET is reset to FALSE, Q1 remains TRUE. |
3 | RESET1 switches from FALSE to TRUE. Q1 is reset to FALSE. |
4 | SET switches from FALSE to TRUE while RESET1 remains TRUE. As RESET1 has priority over SET, Q1 remains FALSE. |
5 | RESET1 is reset to FALSE while SET remains TRUE. Q1 is set to TRUE. |
6 | RESET1 switches from FALSE to TRUE while SET remains TRUE. As RESET1 has priority over SET, Q1 is set to FALSE. |
7 | The inputs SET and RESET1 are FALSE. Q1 is also FALSE. |
|