272
D P
I
N T
S
D
1
2
M
3
○○○○
FNC
129
X Y M S
D.b R.b
KnX KnY
KnM KnS
T C
D,R
V,Z
UnG
K,H
E
" $"
S
D
INT D0 D10
X0
S
D
S
D
Operand
Devices
BIN Floating Point → BIN Integer Format
DINTP D0 D10
X0
S
D
D
X0=OFF→ON
123456
123456.7
Before operation
After operation
(D1, D0) BIN floating number
(D11, D10) BIN integer, the value of fractional part will be ignored
X0=ON
123
123.45
(D1, D0) BIN floating number
Before operation
After operation
(D10) BIN integer, the value of fractional part will be ignored
The 16-bit instruction, D occupies 1 component The 32-bit instruction, D occupies 2 components
S : the source device to be performed the converting operation
D : the destination device to store the converted result
This instruction performs the converting operation on a BIN oating point number that is designated by and
stores the converted BIN format integer result in the designated device. The fractional part of the oating point
number beyond the integer part will be ignored.
When X0 = “ON”, this instruction performs the converting operation on the BIN oating point number in (D1, D0),
then the result of converted BIN format integer part will be stored in the D10 but the rest value (the fractional part)
will be ignored.
When this instruction is used as a 32-bit instruction, the is a 32-bit device, too.
When X0 = “OFF” → “ON”, this instruction performs the converting operation on the BIN oating point number in
(D1, D0), then the result of converted BIN format integer part will be stored in the (D11, D10) but the rest value (the
fractional part) will be ignored.
The format for storing a oating point number will occupy two Registers in the PLC system. Please refer to the
section 2-13 “Numerical System” for the reference of the oating point number.
When the operated result is equal to “0”, the Addition / Subtraction Zero Flag M9020 turns “ON”.
When the operated result has the fractional part and that is ignored, the Borrow Flag M9021 turns “ON”.
When the operated result is exceeded the available range of the BIN integer below, the Carry Flag M9022 turns “ON”.
For a 16 bit instruction: –32,768~32,767
For a 32 bit instruction: –2,147,483,648~2,147,483,647