DIV_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 division where 2 arrays with 2 dimensions are divided 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 divison. 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 divided |
|
|
number of columns to divide |
|
Return value: |
– |
|
array containing the result of the bulk division |
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,
-
that the size of the arrays for
A1
andA2
amounts at least to the rows ofM
and the columns ofN
. -
that no division by
0
is executed.
In case of an error the output ENO
of the block is set to value FALSE
(or an equivalent). In case of a division by 0
the corresponding element is set to 0
.
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.