L9_MU16: Multiply 16-Bit
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
The L9_MU16 procedure performs signed or unsigned 16-bit multiplication by multiplying VALUE1 by VALUE2, and then posts the RESULT in 2 contiguous words.
The multiply operation begins when the input to the ENABLE pin is turned ON. The SIGNED input indicates whether the multiplication will be a signed (ON) or unsigned (OFF) operation.
The OUT output turns ON upon the successful completion of the operation.
Formula
RESULT = VALUE1 × VALUE2
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
OFF to ON initiates the operation.
Bottom
SIGNED
BOOL
ON indicates a signed operation; OFF indicates an unsigned operation.
Node
Node
Name
Data Type
Address Range
Meaning
Top
IN
VALUE1
%IW, %MW
The multiplicand. Can be displayed as an integer constant, can be stored in a variable located in a %IW input word or a %MW memory word, or can be in an unlocated word.
Valid range:
-32,768 to 32,767 (signed)
0 to 65,535 (unsigned).
Middle
IN
VALUE2
UINT
%IW, %MW
The multiplier. Can be displayed as an integer constant, or can be stored in a variable located in a %IW input word, a %MW memory word or an unlocated word.
Valid range:
-32,767 to 32,768 (signed)
0 to 65,535 (unsigned).
Bottom
IN/OUT
RESULT
ArrUInt2
%MW
The product. Can be as much as 4,294,967,295 in an unsigned operation, or +/- 65,535 in a signed operation. The first word stores the low-order half of the product, and the second word stored the high-order half of the product. For example:
  • if the multiplication operation is unsigned with a product of 70,000, the first word holds a value of 4,465 and the second word holds a value of 1, or
  • if the product is 700, the first word holds a value of 700 and the second word holds a value of 0.
Must be located in 2 %MW memory words or 2 unlocated UINT words.
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
ON indicates the 16-bit multiplication operation succeeded. (Echoes the status of the ENABLE input).