6-84
INT(P),DINT(P)
(3) The integer value stored at +1 and is stored as BIN 32 bits.
(4) After conversion, the first digit after the decimal point of the real number is rounded off.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• The contents of the designated device or the result of the addition are not "0", or not within
the following range(For the Universal model QCPU only):
0, 2
-126
| Contents of designated device | < 2
128
(Error code: 4140)
• The value of the specified device is 0, unnormalized number, nonnumeric, and ± .
(For the Universal model QCPU only) (Error code: 4140)
• The 32-bit floating decimal point type data designated by when the INT instruction was
used was outside the 31768 to 32767 range. (Error code: 4100)
• The 32-bit floating decimal point type data designated by when the DINT instruction
was used was outside the 2147483648 to 2147483647 range. (Error code: 4100)
Program Example
(1) The following program converts the 32-bit floating decimal point type real number at D20
and D21 to BIN 16-bit data, and stores the result at D0.
[Ladder Mode] [List Mode]
[Operation]
D D
S
S
Step
Instruction
Device
Integer
conversion
BIN value
D0
25916
Integer
conversion
An operation error occurs
since "setting data < -32768."
32-bit floating-point
real number
D21
-33562.3211
D20
32-bit floating-point
real number
D21
25915.6796
D20