EasyManua.ls Logo

Delta VP3000 Series - Page 369

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
360
API Instruction code Operand Function
173 D SUBR P S
1
, S
2
, D
Floating-point number subtraction
Type
Operand
Bit devices Word devices
16-bit instruction
- - - -
32-bit instruction (13 steps)
DSUBR
Continuous
execution
type
DSUBRP
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 minuend
S
2
: floating-point number subtrahend
D: difference (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 121 DESUB.
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 DSUBRP is generally used) and
the drive contact is ON, the register will operate once in every scan.
Example
Example 1
When X0 = ON, subtract the floating-point value F2.200E+0 from 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), the operation
result is F-1.000E+0 and is stored in the register (D10, D11).
X0
DSUBR F1.200E+0
D10
F2.200E+0
Example 2
When X0 = ON, subtract the floating-point numbers (D3, D2) from the floating-point numbers
(D1, D0), and stores the result in (D11, D10).
X0
DSUBR
D0
D2
D10

Table of Contents

Related product manuals