Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 677

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

Advertisement

Processing details
• These instructions convert the single-precision real number data stored in the device specified by (s1) to a character string
according to the display specification stored in the device number specified by (s2) and later, and store the converted data
in the device number specified by (d) and later.
• The type of the converted data varies depending on the display specification stored in the device specified by (s2).
0: Decimal point format
(s2)
1: Exponent format
(s2)+1
Total number of digits
(s2)+2
Number of digits in the decimal part
■Decimal point format
• When 0 is specified in (s2), the decimal point format is used.
(s2)
Decimal point format
(s2)+1
Total number of digits
Number of digits in the
(s2)+2
decimal part
(s1)+1
(s1)
Single-precision real number
• Total number of digits in the device specified by (s2)+1: When the number of digits in the decimal part is 0, total number of
digits (maximum of 24)number of digits in the integral part
(maximum of 24)(number of digits in the integral part
*1 Indicates the number of digits in the integral part of the 32-bit floating point real number data in the device specified by (s1).
• The number of digits in the decimal part that can be specified by (s2)+2 is 0 to 7. Note that the number of digits in the
decimal part must be smaller than the total number of digits minus 3.
• The converted character string data are stored in the device areas specified by (d) and later as shown below.
• As sign data, 20H (space) is stored if the single-precision real number data is positive, and 2DH (-) is stored if the data is negative.
• If the decimal part of the single-precision real number data is not stored within the range of the number of digits in the decimal part, the lower decimal digits
are rounded off.
(s2)
0
(s2)+1
8
(s2)+2
2
(s1)+1
(s1)
-
1
. 2 3
4 5 6
(1) Total number of digits
(2) Number of digits in the decimal part
(3) Rounded off.
• If the number of digits in the decimal part is set to a value other than 0, 2EH (.) is automatically stored at the position of the specified number of digits in the
decimal part plus 1. If the number of digits in the decimal part is 0, "2EH" (.) is not stored.
(s2)
0
(s2)+1
8
(s2)+2
2
(s1)+1
(s1)
-
1
. 2 3
4 5 6
(1) Total number of digits
(2) Number of digits in the decimal part
(3) Automatically added.
.
Sign
*1
(1)
-
1
. 2 3
4 5 6
(2)
(1)
-
1
. 2 3
(2)
(3)
b15
b8 b7
∙∙∙
ASCII code ((total number of
(d)
digits - 1)th digit)
ASCII code ((total number of
(d)+1
digits - 3)th digit)
ASCII code ((total number of
(d)+2
digits - 5)th digit)
ASCII code ((total number of
(d)+3
digits - 7)th digit)
(d)+4
00H
A null character, 00H, is automatically stored at the end of string.
*1
+1. When it is a value other than 0, total number of digits
+number of digits in the decimal part+2).
(3)
b0
∙∙∙
ASCII code (sign data)
ASCII code ((total number of
digits - 2)th digit)
ASCII code ((total number of
digits - 4)th digit)
ASCII code ((total number of
digits - 6)th digit)
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
7
675

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents