Delta DVP-ES2 User Manual Page 231

  • Download
  • Add to my manuals
  • Print
  • Page
    / 702
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 230
3. Instruction Set
3-115
API Mnemonic Operands Function
49
D FLT P
Floating Point
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
*
FLT, FLTP: 5 steps
DFLT, DFLTP: 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: Device for storing the conversion result
Explanations:
1. When M1081 = OFF, the source S is converted from BIN integer to binary floating point value.
At this time, 16-bit instruction FLT occupies 1 register for S and 2 registers for D.
a) If the absolute value of the conversion result max. floating value, carry flag M1022 = ON.
b) If the absolute value of the conversion result min. floating value, carry flag M1021 = ON.
c) If conversion result is 0, zero flag M1020 = ON.
2. When M1081 is ON, the source S is converted from binary floating point value to BIN integer.
(Decimal ignored). At this time, 16-bit instruction FLT occupies 2 registers for S and 1
register for D. The operation is same as instruction INT.
a) If the conversion result exceeds the available range of BIN integer in D (for 16-bit: -32,768 ~
32,767; for 32-bit: -2,147,483,648 ~ 2,147,483,647), D will obtain the maximum or minimum
value and carry flag M1022 = ON.
b) If the decimal is ignored, borrow flag M1021=ON.
c) If the conversion result = 0, zero flag M1020=ON.
d) After the conversion, D stores the result in 16 bits.
Program Example 1:
1. When M1081 = OFF, the BIN integer is converted into binary floating point value.
2. When X20 = ON, D0 is converted to D13, D12 (floating point).
3. When X21 = ON, D1, D0 are converted to D21, D20 (floating point).
4. Assume D0 is K10. When X10 is ON, the converted 32-bit value will be H41200000 and
stored in 32-bit register D12 (D13)
5. If 32-bit register D0 (D1)=K100,000, X21 = ON. 32-bit of floating point after conversion will be
H47C35000 and it will be saved in 32-bit register D20 (D21)
Page view 230
1 2 ... 226 227 228 229 230 231 232 233 234 235 236 ... 701 702

Comments to this Manuals

No comments