EasyManua.ls Logo

Delta VP3000 Series - Page 371

Delta VP3000 Series
714 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 7 Second Development Platform VP3000
362
API Instruction code Operand Function
175 D DIVR P S
1
, S
2
, D
Floating-point number division
Type
Operand
Bit devices Word devices
16-bit instruction
- - - -
32-bit instruction (13 steps)
DDIVR
Continuous
execution
type
DDIVRP
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 dividend
S
2
: floating-point number divisor
D: quotient (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 123 DEDIV.
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 DDIVRP 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) divided by the floating-point value F2.200E+0, the operation result is
F0.545E+0 and is stored in the register (D10, D11).
X0
DDIVR F1.200E+0
D10
F2.200E+0
Example 2
When X1 = ON, the floating-point number (D1, D0) divided by (D11, D11), and store the quotient
to (D21, D20).
X1
DDIVR
D0 D10 D20

Table of Contents

Related product manuals