Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 393

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Processing details
• These instructions convert the single-precision real number in the device specified by (s) to 32-bit signed binary data, and
store the converted data in the device specified by (d).
• After conversion, the first digit after the decimal point of the single-precision real number is rounded off.
• When an input value is set using the engineering tool, a rounding error may occur. For the precautions on setting an input
value using the engineering tool, refer to the following.
Page 49 Precautions
The following program example converts, when M0 turns on, the single-precision real number stored in D0 and D1 to 32-bit
signed binary data, and stores the converted data in D100 and D101.
SM402
M0
Operation error
Error code
Description
(SD0)
3401H
The single-precision real number in the device specified by (s) is out of the range, -2147483648 to 2147483647.
3402H
An unusual number is set to (s).
• The single-precision real number set to (s) is not within the following range:
-126
|(s)|<2
0, 2
• The value set to a device or label is -0, a subnormal number, NaN (not a number), or .
EMOVP
E-123456.7
D0
(s)
(d)
FLT2DINT
D0
D100
128
(s)
b31
∙∙∙
b16
b15
∙∙∙
b0
D1, D0
C7F1H
205AH
(-123456.7)
6.6 Data Conversion Instructions
(d)
b31
∙∙∙
b16
b15
∙∙∙
b0
D101, D100
FFFEH
1DBFH
(-123457)
6 BASIC INSTRUCTIONS
6
391

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents