Mitsubishi Electric MELSEC-Q/L Programming Manual page 564

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

■When using decimal point format
S2
Decimal point format
+1
S2
Total number of digits
+2
S2
Number of digits in decimal fraction
S1
+1
32-bit floating-point real number
For example, in a case where there are 8 digits in total, with 3 digits in the decimal fraction part, and the value designated is -
1.23456, the operation result would be stored in the area starting from (D) in the following manner:
S2
0
S2
+1
8
S2
+2
3
S1
+1
S1
-1. 2 3 4 5 6
32-bit floating-point real number
• The total number of digits that can be designated by (S2)+1 is as shown below:
• When the number of decimal fraction digits is "0": Number of digits (max.: 24)  2
• When the number of decimal fraction digits is other than "0": Number of digits (max.: 24)  (Number of decimal fraction digits + 3)
• The number of digits of decimal fraction part that can be designated by (S2)+2 is from 0 to 7. However, the number of digits
following the decimal point must be smaller than or equal to the total number of digits minus 3.
7 APPLICATION INSTRUCTIONS
562
7.11 Character String Processing Instructions
.
Sign
S1
-
1
. 2 3 5
Sign
b15
ASCII code for the
D
(total number of digits -1)
th digit
ASCII code for the
+1
D
(total number of digits -3)
th digit
ASCII code for the
D
+2
(total number of digits -5)
th digit
ASCII code for the
D
+3
(total number of digits -7)
th digit
+4
D
Automatically stored at the
end of character sting
b15
b8 b7
D
20
(space)
H
D
31
(1)
20
+1
H
32
(2)
D
+2
H
35
(5)
D
+3
H
00
D
+4
H
Automatically stored at the end of character sting
b8 b7
b0
ASCII code for the sign
ASCII code for the
(total number of digits -2)
th digit
ASCII code for
decimal point (.)
(2E
)
H
ASCII code for the
(total number of digits -6)
th digit
00
H
b0
2D
(-)
H
(space)
H
2E
(.)
H
33
(3)
H

Advertisement

Table of Contents
loading

Table of Contents