Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
6-87
INTD(P),DINTD(P)
1
2
3
4
4
6
7
8
6.3 Data conversion instructions
6.3.6
Conversion from floating decimal point data to BIN16- and 32-bit data (Double precision)
(INTD(P),DINTD(P))
(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.
The value of the specified device is not in the following range: (Error code: 4140)
0, 2
-1022
| value of specified device | 2
1024
The value of the designated device is 0. (Error code: 4140)
The 64-bit floating decimal point type data designated by when the INTD instruction
was used was outside the 31768 to 32767 range. (Error code: 4100)
The 64-bit floating decimal point type data designated by when the DINTD instruction
was used was outside the 2147483648 to 2147483647 range. (Error code: 4100)
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]
[Operation]
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
D1
574968
D0
D21
574968.321
D20D23
D22
D21
2147483649.22
D20D23 D22
Conversion to integer
BIN value
Conversion to integer
An operation erroe occurs because the
specified data is larger than 2147483647.
64-bit floating-point real number
64-bit floating-point real number