Function
*U
*U(420) multiplies the binary values in Md and Mr and outputs the result to R, R+1.
*UL
*UL(423) multiplies the unsigned binary values in Md and Md+1 and Mr and Mr+1 and outputs the
result to R, R+1, R+2, and R+3.
Sample program
Example in Function Block Definition
In the following example, an array variable is used to get the result from the function block as one word.
a * b
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Md
Mr
R+1
R
Md + 1
Md
×
Mr + 1
Mr
R + 3
R + 2
R + 1
R
*U
When CIO 0.00 is ON in the following example, D100
and D110 will be multiplied as 4-digit unsigned binary
0.00
D100
values and the result will be output to D121 and D120.
D110
D120
When CIO 0.00 is ON in the following example, D100, D110,
*UL
D111, and D110 will be multiplied as 8-digit unsigned binary
0.00
D100
values and the result will be output to D123, D122, D121,
and D120.
D110
D120
c
Function Block Variables
*U
Multiplicand: a (data type: UINT)
a
Multiplier: b (data type: UINT)
b
Result: c (data type: UINT)
Temporary variable: tmp (data type: WORD, 2-element array)
tmp[0]
MOV
tmp[0]
c
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
(Unsigned binary)
3. Instructions
3
365
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers