Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 400

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Function
*
*(420) multiplies the signed binary values in Md and Mr and outputs the result to R, R+1.
*L
*L(421) multiplies the signed 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.
×
R + 3
R + 2
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 → c
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Md
(Signed binary)
Mr
(Signed binary)
R +1
(Signed binary)
R
(Signed binary)
Md + 1
Md
(Signed binary)
Mr + 1
Mr
R + 1
R
(Signed binary)
0.00
*
When CIO 0.00 is ON in the following example, D100 and
D110 will be multiplied as 4-digit signed hexadecimal
D100
values and the result will be output to D120 and D121.
D110
D120
0.00
*L
When CIO 0.00 is ON in the following example, D101,
D100, D111, and D110 will be multiplied as 8-digit signed
D100
hexadecimal values and the result will be output to D123,
D110
D122, D121 and D120.
D120
Function Block Variables
*
Multiplicand: a (data type: INT)
a
Multiplier: b (data type: INT)
b
Result: c (data type: INT)
Temporary variable: tmp (data type: WORD, 2-element array)
tmp[0]
MOV
tmp[0]
c
3. Instructions
3
363

Advertisement

Table of Contents
loading

Table of Contents