FUNCTION_BLOCK M_OPS

Hover on a highlighted element
to pop up its description (if any).

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.

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 Bwith 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 Bwith 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
Y = det(A)
ARRAY_SIZE_ERROR(13) if (A.rowCount≠A.columnCount)
DIVISION_BY_ZERO(4) if ABS(Y)≤X
TRANS B = AT N/A