5
Categories and Use of Basic Application Instructions
DVP-PM Application Manual
5-99
API Mnemonic
Operands
Function
120
D EADD P
Binary Floating Point Addition
Controllers
20PM
10PM
Bit Devices
Word Devices
Program Steps
Type
OP
X Y M S F H
KnX KnY KnM KnS T
C
D
V
Z
S
1
*
*
S
2
*
*
D
*
DEADD, DEADDP: 9 steps
Operands:
S
1
: Augend
S
2
: Addend
D
: Addition result
Explanations:
1.
S
1
+
S
2
=
D
. The floating point value in
S
1
and
S
2
are added and the result is stored in
D
2. F refers to floating point input. Be sure to add a decimal point when using it.
3. Only 32-bit instructions DEADD and DEADDP are applicable..
4. If
S
1
or
S
2
is specified with floating point value F, the instruction will operate in binary floating point.
5.
S
1
and
S
2
can designate the same register. In this case, if the instruction is specified as “continuous execution
instruction” (generally DEADDP instruction) and the drive contact is ON, the register will be added once in every
scan.
6. Flags:
OX
O100
Zero flag
M1808
M1968
Borrow flag
M1809
M1969
Carry flag
M1810
M1970
a) If the absolute value of the result exceeds the max. floating point value, carry flag will be ON.
b) If the absolute value of the result is less than min. floating point value, borrow flag will be ON.
c) If the conversion result is 0, zero flag will be ON
Program Example 1:
When X0 = ON, add the binary floating point value (D1, D0) with binary floating point value (D3, D2) and store the
result in (D11, D10).
X0
DEADD
D0
D2
D10
Program Example 2:
When X2 = ON, add the binary floating point value of (D11, D10) with F1234.0 (automatically converted to binary
floating point value) and store the result in (D21, D20).
X2
DEADD
D10
F1234.0
D20
Points to note:
For floating point operations, see “5.3 Numeric Values for Data Processing”.
Summary of Contents for DVP-10PM
Page 1: ......
Page 45: ...2 Hardware Specifications and Wiring DVP PM Application Manual 2 30 MEMO...
Page 125: ...3 Functions of Devices in DVP PM DVP PM Application Manual 3 80 MEMO...
Page 341: ...8 Application Examples DVP PM Application Manual 8 2 Trajectory 3 Trajectory 4...
Page 427: ...9 Electrical CAM DVP PM Application Manual 9 74...
Page 437: ...10 Encrypting User Program DVP PM Application Manual 10 10 MEMO...
Page 458: ...11 G code Application DVP PM Application Manual 11 21 B O100 main program...
Page 561: ...14 Appendix DVP PM Application Manual 14 4 MEMO...