EasyManua.ls Logo

Mitsubishi MELSEC-Q/L

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
241
INTD, INTDP, DINTD, DINTDP
1
2
3
4
6
7
8
6.3 Data conversion instructions
6.3.6 INTD, INTDP, DINTD, DINTDP
DINTD
(1) Converts 64-bit floating decimal point type real number designated by to BIN 32-bit data, and stores the result at the
device number designated by .
(2) The range of 64-bit floating decimal point type real numbers that can be designated at +3, +2, +1 or is from
-2147483648 to 2147483647.
(3) The integer value stored at +1 and is stored as BIN 32 bits.
(4) The converted data is the value rounded 64-bit floating-point real number to the first digit after the decimal point.
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.
Program Example
(1) The following program converts the 64-bit floating decimal point type real number at D20 to D23 with BIN 16-bit data, and
stores the result at D0.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program converts the 64-bit floating decimal point type real number at D20 to D23 with BIN 32-bit data and
stores the result at D0 and D1.
[Ladder Mode] [List Mode]
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4140
The specified device value is not within the following range:
0, 2
-1022
| Specified device value | < 2
1024
The specified device value is 0, unnormalized number, nonnumeric,
and ± .
–– –– –– ––
4100
The 64-bit floating point data specified by when the INTD instruction
is used is outside the
-32768 to 32767 range.
–– –– –– ––
4100
The 64-bit floating point data specified by when the DINTD
instruction is used is outside the -2147483648 to 2147483647 range.
–– –– –– ––
S
D
BIN 32 bit
Lower 16 bitsUpper 16 bits
+1
D D
+3
64-bit floating-point
real number
S
+2
S S
+1
S
S S S S
D D
S
S
Step
Instruction
Device
Conversion to integer
BIN value
D0
25916
Conversion to integer
An operation erroe occurs because the specified data is larger than -32768.
D21
25915.6796
D20D23
D22
D21
33562.3211
D20D23 D22
64-bit floating-point real number
64-bit floating-point real number
Step
Instruction
Device

Table of Contents

Related product manuals