Upon the occurrence of an event at the REQ
input of an
instance of the M_MUL
function block type:
-
If the value of the
REQ
input isTRUE
:-
If the number of columns in
IN1
is not equal to the number of rows inIN2
, the value of theQO
output is set toFALSE
, the value of theSTATUS
output is set toARRAY_SIZE_ERROR(13)
, and no change is made in the value ofOUT
. -
Otherwise:
-
The size of
OUT
is adjusted if necessary to contain the same number of rows asIN1
and the same number of columns asIN2
; -
the matrix product
(IN1×IN2)
is placed inOUT
; -
the value of the
QO
output is set toTRUE
; -
the value of the
STATUS
output is set toOK(0)
. - Arithmetic overflow and underflow are not detected.
-
The size of
-
If the number of columns in
-
If the value of the
REQ
input isFALSE
, the value of theQO
output is set toFALSE
, the value of theSTATUS
output is set toINHIBITED(1)
, and no change is made in the value ofOUT
. -
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.