EasyManua.ls Logo

Delta DVP-20PM

Delta DVP-20PM
580 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...
5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-101
API
Applicable model
20PM
121
D
D
ESUB
P
P
Binary floating-point subtraction
Bit device Word device
X Y M S F H KnX KnY KnM KnS T C D V Z
S
1
S
2
D
Note: Please refer to specifications for more information about device
ranges.
F represents a floating-point value. There is a decimal point in a
floating-point value.
Only the 32-bit instructions DEADD and DEADDP are valid.
16-bit instruction
32-bit instruction (9 steps)
DESUB
Continuity
instruction
DESUBP
Pulse
instruction
Flags
Ox O100
M1808 M1968 Zero flag
M1809 M1969 Borrow flag
M1810 M1970 Carry flag
Please refer to the additional remark below.
Explanation
The binary floating-point value in S
2
is subtracted from the binary floating-point
value in S
1
, and the difference is stored in D.
S
1
: Minuend; S
2
: Subtrahend; D: Difference
If S
1
is a floating-point value, the instruction will be used to subtract the binary
floating-point value in S
2
from S
1
. If S
2
is a floating-point value, the instruction
will be used to subtract S
2
from the binary floating-point value in S
1
.
S
1
and S
2
can be the same register. If the instruction DESUB is used under the
circumstances, the value in the register is subtracted from itself whenever the
conditional contact is ON in a scan cycle. Generally, the pulse instruction
DESUBP is used.
If the absolute value of an oepration result is greater than the maximum
floating-point value available, a carry flag will be ON.
If the absolute value of an oepration reuslt is less than the minimum
floating-point value available, a borrow flag will be ON.
If an operation result is 0, a zero flag will be ON.
Example 1
When X0 is ON, the binary floating-point value in (D3, D2) is subtracted from
the binary floating-point value in (D1, D0), and the difference is stored in (D11,
D10).
X0
DESUB
D0
D2
D10
Example 2
When X2 is ON, the binary floating-point value in (D1, D0) is subtracted from
F1234.0, and the difference is stored in (D11, D10).
X2
DESUB
D0
F1234.0
D10
Additional
rema
rk
Please refer to section 5.3 for more information about performing operations on
floating-point values.

Table of Contents

Other manuals for Delta DVP-20PM

Related product manuals