Delta DVP-ES2 User Manual
Page 430
D V P - E S 2 / E X 2 / S S 2 / S A2 / S X 2 / S E O p e r a t i o n M a n u a l - P r o g r a m m i n g
3-314
API Mnemonic
Operands
Function
129
D INT P
Float to integer
Controllers
ES2/EX2 SS2 SA2
SE
SX2
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S
K H
KnX
KnY KnM KnS T C D E F
S
*
*
*
D
*
*
*
INT, INTP: 5 steps
DINT, DINTP: 9 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2 ES2/EX2 SS2
SA2
SE
SX2
Operands:
S: Source device D: Operation result
Explanations:
1.
The binary floating point value in the register S is converted to BIN integer and stored in
register D. The decimal of the operation result will be left out.
2.
This instruction is the opposite of the API 49 (FLT) instruction.
3.
Flags: M1020 (Zero flag), M1021 (Borrow flag) and M1022 (Carry flag).
If the conversion result is 0, zero flag M1020 = ON.
If there is any decimal left out, borrow flag M1021 = ON.
If the conversion result is larger than the below range, carry flag M1022 = ON
16-bit instruction: -32,768 ~ 32,767
32-bit instruction: -2,147,483,648 ~ 2,147,483,647
Program Example:
1.
When X0 = ON, the binary floating point value of (D1, D0) will be converted to BIN integer and
the result is stored in D10. The decimal of the result will be left out.
2.
When X1 = ON, the binary floating point value of (D21, D20) will be converted to BIN integer
and the result is stored in (D31, D30). The decimal of the result will be left out.
INT
X0
D0
D10
DINT
X1
D20
D30