Chapter 7 Second Development PlatformVP3000
361
API Instruction code Operand Function
174 D MULR P S
1
, S
2
, D
Floating-point number multiplication
Type
Operand
Bit devices Word devices
16-bit instruction
- - - -
32-bit instruction (13 steps)
DMULR
Continuous
execution
type
DMULRP
Pulse
execution
type
Associated flag: none
X Y M K H KnX KnY KnM T C D
S
1
S
2
D
Caution for using operand
The floating-point values (e.g. F1.2) can be entered directly into S
1
and S
2
The floating-point value after the operation will be stored in operand
D
Description
S
1
: floating-point number multiplicand
S
2
: floating-point number multiplicator
D: product (floating-point)
When the floating-point values of S
1
and S
2
are stored in the register D, its function is the same
as API 122 DEMUL.
S
1
and S
2
can designate the same register. In this case, if the instruction is specified as
“continuous execution type” instruction (pulse execution type DMULRP is generally used) and
the drive contact is ON, the register will operate once in every scan.
Example
Example 1
When X0 = ON, the floating-point value F1.200E+0 (input the floating-point number F1.2, the
ladder diagram shows a scientific notation F1.200E+0. You can set the floating-point digit by
using WPLSoft) multiplies the floating-point value F2.200E+0, the operation result is
F2.640E+0 and is stored in the register (D10, D11).
X0
DMULR F1.200E+0
D10
F2.200E+0
Example 2
When X1 = ON, multiply the floating-point number (D1, D0) and (D11, D11), and store the
product to (D21, D20).
X1
D0 D10 D20DMULR