MUL_2D_ARRAY block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
not defined in IEC-standard |
Graphical interface |
|
Available since |
|
Functionality
The block performs a bulk multiplication where 2 arrays with 2 dimensions are multiplied element by element until a specified column and row.
Enter the first array at the in-out A1
and the second array at the in-out A2
. The arrays may have different sizes and index ranges (e.g. A1 = [1..2, 1..3]
, A2 = [3..4, 4..8]
). However, the arrays must contain at least those columns and rows that are entered at the inputs M
and N
.
The block returns an array where the first M
rows and N
columns contain the result of the bulk multiplication. The size of this array is determined by the "target array" to which the result of the block is assigned. If the target array contains more elements than M * N
, the excess elements are left unchanged.
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
In-outs |
|
|
variable-length array for the first operands |
|
|
variable-length array for the second operands |
|
Inputs: |
|
|
number of rows to multiply |
|
|
number of columns to multiply |
|
Return value: |
– |
|
array containing the result of the bulk multiplication |
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.
Internal error diagnostic for block
The block checks whether the size of the arrays for A1
and A2
amounts at least to the rows of M
and the columns of N
. If this is not the case, the output ENO
of the block is set to value FALSE
(or an equivalent).
Example for usage within ST-editor
|
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.