Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 678

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

Advertisement

• If the number of digits excluding the sign, decimal point, and decimal part from the total number of digits is greater than the number of digits in the integral part
of single-precision real number data, 20H (space) is stored between the sign and integral part.
(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) Filled with 20Hs (spaces).
• The value "00H" is automatically stored at the end of the converted character string.
• The number of digits in the integral part of the 32-bit floating point real number data in the device specified by (s1) can be 1
to 16.
■Exponential format
• When 1 is specified in (s2), the exponential format is used.
(s2)
Exponent 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)2. When it is a value other than 0, total number of digits (maximum of 24)(number of digits in the
decimal part+7).
• 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 7.
• The converted character string data are stored in the device areas specified by (d) and later as shown below.
• As sign data in the integral part, 20H (space) is stored if the single-precision real number data is positive, and 2DH (-) is stored if the data is negative.
• The integral part is fixed to one digit. 20H (space) is stored between the integral part and sign.
(s2)
1
(s2)+1
12
4
(s2)+2
(s1)+1
(s1)
-
1
2 . 3 4 5 6 7
(1) Total number of digits
(2) Fixed to 1 digit
(3) Filled with 20Hs (spaces).
7 APPLICATION INSTRUCTIONS
676
7.8 String Processing Instructions
(1)
-
1
. 2 3
(2)
(3)
E
.
Sign for integral part
Sign for exponent part
Automatically added.
(1)
(2)
.
-
1
2 3 4 6 E + 0 1
(3)
b15
∙∙∙
ASCII code ((total number of
(d)
digits - 1)th digit)
ASCII code (decimal point (.))
(d)+1
(2EH)
ASCII code ((total number of
(d)+2
digits - 5)th digit)
ASCII code ((total number of
(d)+3
digits - 7)th digit)
ASCII code (sign data for
(d)+4
exponent part)
ASCII code ((total number of
(d)+5
digits - 11)th digit)
(d)+6
A null character, 00H, is automatically stored at the end of string.
b8 b7
b0
∙∙∙
ASCII code (sign data for
integral part)
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)
45H (E)
ASCII code ((total number of
digits - 10)th digit)
00H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents