FUNCTION_BLOCK M_MUL

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

Upon the occurrence of an event at the REQ input of an instance of the M_MUL function block type:

  1. If the value of the REQ input is TRUE:
    1. If the number of columns in IN1 is not equal to the number of rows in IN2, the value of the QO output is set to FALSE, the value of the STATUS output is set to ARRAY_SIZE_ERROR(13), and no change is made in the value of OUT.
    2. Otherwise:
      • The size of OUT is adjusted if necessary to contain the same number of rows as IN1 and the same number of columns as IN2;
      • the matrix product (IN1×IN2) is placed in OUT;
      • the value of the QO output is set to TRUE;
      • the value of the STATUS output is set to OK(0).
      • Arithmetic overflow and underflow are not detected.
  2. If the value of the REQ input is FALSE, the value of the QO output is set to FALSE, the value of the STATUS output is set to INHIBITED(1), and no change is made in the value of OUT.
  3. Following the above actions, an event is issued at the CNF output.

The service sequence primitives for this FB type are structured identically as for the M_ADD FB type.

See the MATRIX_DEMO system configuration for an example of the use of an instance of this function block type.