Mitsubishi MELSEC Q Series Programming Manual page 287

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

(3) The integer value stored at
(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, LCPU):
-126
0, 2
• The value of the specified device is
(For the Universal model QCPU and LCPU)
• The 32-bit floating decimal point type data designated by
used was outside the
• The 32-bit floating decimal point type data designated by
was used was outside the
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]
[Operation]
D21
D20
25915.6796
32-bit floating-point
real number
D21
D20
-33562.3211
32-bit floating-point
real number
+1 and
D
D
| Contents of designated device | < 2
31768 to 32767 range.
2147483648 to 2147483647 range.
Integer
D0
conversion
25916
BIN value
Integer
conversion
An operation error occurs
since "setting data < -32768."
is stored as BIN 32 bits.
128
0, unnormalized number, nonnumeric, and ±
when the INT instruction was
S
when the DINT instruction
S
[List Mode]
Instruction
Step
INT(P),DINT(P)
(Error code: 4140)
.
(Error code: 4140)
(Error code: 4100)
(Error code: 4100)
Device
6-85
1
2
3
4
4
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents