SR block
Short summary
Name |
SR |
→POU type |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
Available since |
version 1.18.0 (for logi.CAD 3) |
Functionality
The block serves for short-term or lasting storage of logical states. Hence it is the equivalent to the seal-in circuit known in the contactor technique .
→Turning input S1 on triggers output Q1 to return value TRUE (or an equivalent). Turning input R on triggers output Q1 to return value FALSE (or an equivalent). The identification S1 indicates that this input is dominant.
In-/outputs
|
Identifier |
Description |
|
Inputs: |
S1 |
BOOL |
set (dominant) |
R |
BOOL |
reset |
|
Outputs: |
Q1 |
BOOL |
|
Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.
See:
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic .
Example for usage within ST-editor
PROGRAM Test
VAR
DB_On : SR;
Out : BOOL;
TriggerS1 : BOOL;
TriggerR : BOOL;
END_VAR
DB_On(S1 := TriggerS1, R := TriggerR, Q1 => Out);
(* Instance of block
'SR'
is called. *)
(* Input
'S1'
gets value from
'TriggerS1'
variable. Input
'R'
gets value from
'TriggerR'
variable.*)
(* Output
'Q'
returns TRUE,
if
'TriggerS1'
is TRUE. Output
'Q'
returns FALSE,
if
'TriggerR'
is TRUE and
'TriggerS1'
is FALSE. *)
(* Variable
'Out'
accesses the output
'Q1'
. *)
END_PROGRAM
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.