An instance of this Function Block type contains an output
MATRIX B
. Upon the occurrence of an event at the REQ
input with
QI = true
, an operation indicated by the OP
input (a value of the enumerated M_OP
data type) is performed as indicated in the table below, followed by
an event at the CNF
output.
-
If the operation succeeds, the
QO
output is settrue
and theSTATUS
output is set to0 (OK)
. -
If the operation fails, the
QO
output is setfalse
, theSTATUS
output indicates the reason for the failure as indicated in the table below, and theB
andY
outputs remain unchanged, except in the following case:-
When
OP = M_OP#INIT
, a syntax error in theIVAL
input will cause theB
output to be the zero matrix ofM
rows andN
columns.
-
When
-
The notation "N/A" in the table below indicates a case where the
condition
QO = false
can not occur upon the issuance of aCNF
following an occurrence of anREQ
event withQI = true.
-
If
QI = FALSE
upon the occurrence of anREQ
event, theQO
output is setfalse
, theSTATUS
output is set to1 (INHIBITED)
, and theB
andY
outputs remain unchanged.
See the M_OPS_DEMO
system
configuration for an interactive demonstration of these features.
OP, e.g., M_OP#ZERO
|
Normal Result |
STATUS value when QI = true and QO
= false
|
---|---|---|
ZERO
|
B = M×N zero-filled matrix
|
N/A |
IDENT
|
B = M×M Identity Matrix
|
N/A |
INIT
|
Reset B to an M×N zero matrix, then
initialize from IVAL
|
TYPE_CONVERSION_ERROR(2) if
an error occurs in parsing IVAL
|
COPY
|
Copy A to B
|
N/A |
GET
|
Y = Bij
|
INVALID_SUBSCRIPT(12) if
(I≥B.rowCount) | (J≥B.columnCount)
|
PUT
|
Bij = X
|
Same as above |
APPEND_ROW
|
Append row I of A to rows of B
|
INVALID_SUBSCRIPT(12) if (I≥A.rowCount)
|
ARRAY_SIZE_ERROR(13) if
(A.colCount≠B.colCount) | (B.rowCount=255)
|
||
APPEND_COL
|
Append column J of A to columns of B
|
INVALID_SUBSCRIPT(12) if (J≥A.columnCount)
|
ARRAY_SIZE_ERROR(13) if
(A.rowCount≠B.rowCount) | (B.colCount=255)
|
||
DELETE_ROW
|
Delete row I of B
|
INVALID_SUBSCRIPT(12) if (I≥B.rowCount)
|
DELETE_COL
|
Delete column J of B
|
INVALID_SUBSCRIPT(12) if (J≥B.columnCount)
|
INS_ROW
|
Insert row I of A
at row J of B
|
INVALID_SUBSCRIPT(12) if
(I≥A.rowCount) | (J≥B.rowCount)
|
ARRAY_SIZE_ERROR(13) if
(A.columnCount≠B.columnCount )| (B.rowCount=255)
|
||
INS_COL
|
Insert column I of A
at column J of B
|
INVALID_SUBSCRIPT(12) if
(I≥A.columnCount) | (J≥B.columnCount)
|
ARRAY_SIZE_ERROR(13) if
(A.rowCount≠B.rowCount) | (B.columnCount=255)
|
||
REPL_ROW
|
Replace row J of B with row I
of A
|
INVALID_SUBSCRIPT(12) if
(I≥A.rowCount) | (J≥B.rowCount)
|
ARRAY_SIZE_ERROR(13) if (A.columnCount≠B.columnCount)
|
||
REPL_COL
|
Replace column J of B with column I
of A
|
INVALID_SUBSCRIPT(12) if
(I≥A.columnCount) | (J≥B.columnCount)
|
ARRAY_SIZE_ERROR(13) if (A.rowCount≠B.rowCount)
|
||
SWAP_ROWS
|
Swap rows I and J of B
|
INVALID_SUBSCRIPT(12) if
(I≥B.rowCount) | (J≥B.rowCount)
|
SWAP_COLS
|
Swap columns I and J of B
|
INVALID_SUBSCRIPT(12) if
(I≥B.columnCount) | (J≥B.columnCount)
|
INNER
|
Y = Inner product of
row I of A
with column J of B
|
INVALID_SUBSCRIPT(12) if
(I≥A.rowCount)|(J≥B.columnCount)
|
ARRAY_SIZE_ERROR(13) if (A.columnCount≠B.rowCount)
|
||
PIVOT
|
Performs a PFI Pivot of column I
from A
into B and places the pivot divisor in Y ,
using X as the zero limit on the pivot divisor.
|
ARRAY_SIZE_ERROR(13) if
(A.rowCount≠B.columnCount) |
(B.rowCount≠B.columnCount)
|
DIVISION_BY_ZERO(4) if ABS(Y)≤X
|
||
INV
|
B = A-1
|
ARRAY_SIZE_ERROR(13) if (A.rowCount≠A.columnCount)
|
DIVISION_BY_ZERO(4) if ABS(Y)≤X
|
||
TRANS
|
B = AT
|
N/A |