Standard function blocks
402
Operation The input (I) value is stored to the output (OA1…OA32) selected by the address input
(A) if the load input (L) or the set input (S) is 1. When the load input is set to 1, the input
(I) value is stored to the output only once. When the set input is set to 1, the input (I)
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.
If the address input is 0, negative or exceeds the number of the outputs, all outputs
are 0.
Example:
Inputs The input data type is selected by the user.
Address input (A): DINT
Reset input (R): Boolean
Load input (L): Boolean
Set input (S): Boolean
Input (I): DINT, INT, REAL, REAL24, Boolean
Outputs The number of the output channels (1…32) is selected by the user.
Output (OA1…OA32): DINT, INT, REAL, REAL24, Boolean
SWITCH
(10063)
Illustration
Execution time 0.68 µs (when two inputs are used) + 0.50 µs (for every additional input). When all
inputs are used, the execution time is 15.80 µs.
Operation The output (OUT) is equal to the corresponding input (IN) if the activate input (ACT) is 1.
Otherwise the output is 0.
Inputs The input data type and the number of inputs (1…32) are selected by the user.
Activate input (ACT): Boolean
Input (IN1…IN32): INT, DINT, REAL, REAL24, Boolean
Outputs Output (OUT1…OUT32): INT, DINT, REAL, REAL24, Boolean
S L R A I OA1 OA2 OA3 OA4
1 0 0 2 150 0 150 0 0
0 0 0 2 120 0 150 0 0
0 1 0 3 100 0 150 100 0
1 0 0 1 200 200 150 100 0
1 1 0 4 250 200 150 100 250
11123000000
SWITCH
(BOOL) 83
TLA1 1 msec (1)
ACT
IN1
IN2
OUT1
OUT1(83)
OUT2
OUT2(83)