Summation of vector elements
![]() |
![]() |
| Vectorized | C | ST
| |
in the palette |
on the schematic |
The block implements the summation of all elements of vector input signals. Output – scalar value (default):

where u1 i(t), u2 i(t), … are the elements of the input signal vectors of the blocks (the elements of the vectors u1(t), u2(t),…), y(t) are the output signal of the block, a1, a2, … are the weight factors of the inputs. If the property is set to sum through k>1 elements, then the dimension of the output signal is equal to k. For example, the block algorithm for k=2:


where u1 i(t), u2 i(t), … are the elements of the input signal vectors of the blocks (the elements of the vectors u1(t), u2(t),…), y(t) are the output signal of the block, a1, a2, … are the weight factors of the inputs. If the property is set to sum through k>1 elements, then the dimension of the output signal is equal to k. For example, the block algorithm for k=2:

Inputs
- vector_n - port for the input n-th vector. The number of inputs is equal to the number of elements of the weight factor vector in the block properties.
Outputs
- output - port for the resulting value.
Properties
- Weight factors of the inputs – numbers a1, a2, … by which the values of the input ports of the block are multiplied. The number of input ports of the block is equal to the dimension of this parameter.
- Summarize through (number of the elements) – - integer k, showing how many elements in the input vectors to summarize the elements through. The dimension of the output signal is equal to this number.
Parameters
none
Note:
- The unit generates a scalar output signal at k=1 and a vector output signal at k>1.
- Named properties can be set as local model variables (or submodels) in a programming language script, as global project signals using the Tools → Signals main menu item, or as external project signals using an attachable signal database.

