1852
25 TYPE CONVERSION FUNCTIONS
25.43 Converting REAL to STRING
• Input a REAL data type value to (s).
• The converted string data is output from (d) as follows.
• The NULL code (00H) is automatically stored at the end (i.e. seventh word) of the converted string.
• The number of digits for an integral part, decimal part, and exponent is fixed, integral part: one digit; decimal part: five digits; exponent: two digits.
• As the second byte, 20H (space) is stored; as the fourth byte, 2EH (.) is stored; and as the 10th byte, 45H (E) is stored automatically.
• As sign data (for integral part), 20H (space) is stored if the input value is positive, and 2DH (-) is stored if the input value is negative.
• The sixth and later digits of the decimal part are rounded off.
• If the number of digits in the input value is less than the number of significant digits, 30H (0) is stored in the decimal part.
• As sign data (for exponent), 2BH (+) is stored if the input value is positive, and 2DH (-) is stored if the input value is negative.
• When the exponent is one digit, 30H (0) is stored in the tens place of the exponent.
(s)
(d)
1
0
+
E
6
-
1 . 2 3 4 5
-12.3456
Filled with 20H (space).
Integral
part (1)
Exponent
part (2)
Decimal
part (5)
Total number of digits (13)
Filled with 45H (E).
Filled with 2EH (.).
REAL type
(d)
(s)
1
0
+
E
8
7
7
6
6
-
1 . 2 3 4 5
-12.345678
Number of digits
in the decimal part (5)
Total number of digits (13)
Rounded off.
REAL type
(d)
(s)
1
0
+
E
0
-
1 . 2 3 4 0
-12.34
Total number of digits (13)
Filled with 30Hs (0s).
Number of digits in the decimal part (5)
REAL type
(d)
(s)
1
0
+
E
6
-
1 . 2 3 4 5
-12.3456
Number of digits in the exponent part (2)
Total number of digits (13)
Filled with 30H (0).
REAL type
Summary of Contents for MELSEC iQ-R Series
Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...
Page 34: ...32 MEMO ...
Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...
Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...
Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...
Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...
Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...
Page 2109: ......