Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 765

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

Advertisement

• If 2BH(+) is specified for the sign or the sign is omitted in decimal point format, the converted single-precision real number
is treated as a positive value. If 2DH(-) is specified for the sign, it is treated as a negative value.
• If 20H (space) or 30H (0) exists between digits excluding the first 0 in the character string in the device specified by (s), the
instruction performs conversion by ignoring 20H and 30H.
b15
∙∙∙
b8
b7
(s)
20H (space)
(s)+1
31H (1)
(s)+2
32H (2)
(s)+3
31H (1)
(s)+4
00H
-
0
1 . 2 3 1
(1)
(1) Ignored.
(2) Single-precision real number
■Exponential format
• When the character string in the device specified by (s) is in exponential format, conversion is performed as shown below.
b15
∙∙∙
b8
b7
(s)
20H (space)
(s)+1
2EH (.)
(s)+2
32H (2)
(s)+3
31H (1)
(s)+4
2BH (+)
(s)+5
30H (0)
(s)+6
00H
-
1 . 3 2 0 1 E + 1 0
(1) Single-precision real number
• The character string in the device specified by (s) to be converted to a single-precision real number is converted by
assuming that the six digits excluding the sign, decimal point, and exponent are effective and the seventh and subsequent
digits are discarded.
b15
∙∙∙
b8
b7
(s)
20H (space)
(s)+1
2EH (.)
(s)+2
35H (5)
(s)+3
33H (3)
(s)+4
31H (1)
(s)+5
45H (E)
(s)+6
30H (0)
00H
(s)+7
-
-
1
.
3
5
0 3 4 1 2 E - 0 2
(1)
(1) Rounded down.
(2) Single-precision real number
∙∙∙
b0
2DH (-)
30H (0)
(d)+1
2EH (.)
-
1
. 2
33H (3)
∙∙∙
b0
2DH (-)
31H (1)
(d)+1
33H (3)
- . 3
1
2
30H (0)
45H (E)
31H (1)
∙∙∙
b0
2DH (-)
31H (1)
(d)+1
33H (3)
- . 3 5
1
30H (0)
34H (4)
32H (2)
2DH (-)
32H (2)
(d)
3 1
(2)
(d)
0
1
E
+
1
0
(1)
(d)
0
3 4
E - 2
(2)
7 APPLICATION INSTRUCTIONS
7.9 Real Number Instructions
7
763

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents