Standard function blocks
342
Outputs Output (O): INT, DINT
REG
(10038)
Illustration
Execution time 2.27 µs (when two inputs are used) + 1.02 µs (for every additional input). When all
inputs are used, the execution time is 32.87 µs.
Operation The input (I1…I32) value is stored to the corresponding output (O1…O32) if the load
input (L) is set to 1 or the set input (S) is 1. When the load input is set to 1, the input
value is stored to the output only once. When the set input is 1, the input value is stored
to the output every time the block is executed. The set input overrides the load input.
If the reset input (R) is 1, all connected outputs are 0.
Example:
Inputs The input data type and number of inputs (1…32) are selected by the user.
Set input (S): Boolean
Load input (L): Boolean
Reset input (R): Boolean
Input (I1…I32): Boolean, INT, DINT, REAL, REAL24
Outputs Output (O1…O32): Boolean, INT, DINT, REAL, REAL24
REG
(BOOL) 68
TLA1 1 msec (1)
S
>L
R
I1
I2
O1
O1(68)
O2
O2(68)
SRL I O1
previous
O1
00010 15 15
0 0 0->1 20 15 20
01030 20 0
0 1 0->1 40 0 0
10050 0 50
1 0 0->1 60 50 60
11070 60 0
1 1 0->1 80 0 0
O1
previous
is the previous cycle output value.