EasyManua.ls Logo

Delta VP3000 Series - Page 352

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 PlatformVP3000
343
API Instruction code Operand Function
121 D ESUB P S
1
, S
2
, D
Binary floating-point number subtraction
Type
Operand
Bit devices Word devices
16-bit instruction
- - - -
32-bit instruction (13 steps)
DESUB
Continuous
execution
type
DESUBP
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
See the specification of each model for the scope of device’s usage.
Description
S
1
: minuend
S
2
: subtrahend
D: difference
Subtract the content of the register that S
2
designates from the content of the register that S
1
designates , and its difference is stored in the register that D designates. This subtraction is
performed in the form of binary floating-point numbers.
If S
1
or S
2
is a designated constant K or H, the instruction will convert the constant into a binary
floating-point value before the subtraction.
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 DESUBP is generally used) and
the drive contact is ON, the register will be subtracted once in every scan.
Example
Example 1
When X0 = ON, the binary floating-point numbers (D1, D0) subtract the binary floating-point
numbers (D3, D2), and stores the result in (D11, D10).
X0
DESUB
D0
D2
D10
Example 2
When X2 = ON, subtract the binary floating-point numbers (D1, D0) from K1234 (convert to
binary floating-point number automatically), and stores the result in (D11, D10).
X2
DESUB
D0K1234 D10

Table of Contents

Related product manuals