Mitsubishi MELSEC iQ-F FX5 series Programming Manual page 388

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

• For example, when the total number of digits is "12", the number of digits of the decimal part is "4", and "-12.34567" is
specified, data is stored in (d) and later as shown below:
(s2)
1
Total number of digits
(s2)+1
12
(s2)+2
4
-
Sign (integer part)
(s1)+1
(s1)
-
1
. 2 3
4 5 6
7
Single-precision real number
• The converted character string data are stored in the device areas specified by (d) and later as shown below.
• As sign data of the integral part, "20H" (space) is stored if the single-precision real number is positive, and "2DH" (-) is stored if the data is negative.
• The integer part is fixed to 1 digit. "20H (space)" is stored between the integer part and the sign.
(s2)
1
12
(s2)+1
(s2)+2
4
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
• If the decimal part of the single-precision real number data cannot be accommodated in the number of digits of the decimal part, lower digits of the
decimal part are rounded.
(s2)
1
(s2)+1
12
(s2)+2
4
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
• If the number of digits in the decimal part is set to other than 0, "2EH" (.) is automatically stored at the position before the specified number of digits. If
the number of digits in the decimal part is 0, "2EH" (.) is not stored.
(s2)
1
(s2)+1
12
(s2)+2
4
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
• For the sign of the exponent part, "2BH (+)" is stored when the exponent is positive, and "2DH (-)" is stored when the exponent is negative.
• The exponent part is fixed to 2 digits. When the exponent part is 1 digit, "30H (0)" is stored after the sign of the exponent part.
(s2)
1
(s2)+1
12
(s2)+2
4
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
• The value "00H" is automatically stored at the end of the converted character string.
7 APPLICATION INSTRUCTION
386
7.6 Character string operation instruction
Number of digits
of decimal part
1
. 2 3 4 6
E
+
0
1
Fixed to 2 digit
Sign (exponent part)
Total number of digits
Fixed to 1 digit
.
-
1
2 3 4 6 E + 0 1
"20H (space)" is stored.
Total number of digits
-
1 .
2 3 4 6 6 7 E +
Number of digits of decimal part
Total number of digits
.
-
1
Number of digits of decimal part
Total number of digits
.
-
1
2 3 4 6 E + 0 1
b15
(d)
20H (space)
2EH(.)
(d)+1
33H(3)
(d)+2
36H(6)
(d)+3
2BH(+)
(d)+4
(d)+5
31H(1)
(d)+6
"0000H" is automatically stored at the end of the character string.
0 1
These values are rounded down.
2 3 4 6 E + 0 1
Added automatically
Fixed to 2 digit
"30H (0)" is stored.
b8 b7
b0
2DH(-)
31H(1)
32H(2)
34H(4)
45H (E)
30H(0)
0000H

Advertisement

Table of Contents
loading

Table of Contents