
643
Floating-point Math Instructions
Section 3-15
Note Either one or two bytes of zeroes are added to the end of ASCII text as an end
code.
Total number of characters odd: 00 hex is stored after the ASCII text.
Total number of characters even: 0000 hex is stored after the ASCII text.
Limits on the Number of ASCII Characters
There are limits on the number of ASCII characters in the converted number.
The Error Flag will be turned ON if the number of characters exceeds the
maximum allowed.
1.
Limits on the Total Number of ASCII Characters
a) Decimal Notation (C = 0000 hex)
• When there is no fractional part (C+2 = 0000 hex):
2
≤
Total Characters
≤
24
• When there is a fractional part (C+2 = 0001 to 0007 hex):
(Fractional 3)
≤
Total Characters
≤
24
b) Scientific Notation (C = 0001 hex)
• When there is no fractional part (C+2 = 0000 hex):
6
≤
Total Characters
≤
24
• When there is a fractional part (C+2 = 0001 to 0007 hex):
(Fractional 7)
≤
Total Characters
≤
24
2.
Limits on the Number of Digits in the Integer Part
.
Decimal notation (C=0000 hex)
Integer part
Positive number: Space (20 hex)
Negative number: Minus sign (2D hex)
Sign
Total number of characters
If there are more fractional digits in the source data than specified in C+1, the extra digits will be rounded
off. If there are fewer fractional digits, zeroes (ASCII: 30 hex) will added to the end of the source data.
A decimal point (ASCII: 2E hex) is added if the number fractional digits is greater than 0.
Spaces (ASCII: 20 hex) are added if the integer part of the floating-point data is shorter than the integer part of the result
(total number of characters - sign digit - decimal point - fractional digits).
Fractional part
Decimal point
Storage of ASCII Text
After the floating-point number is converted to ASCII text, the ASCII characters are stored in the destina-
tion words beginning with D, as shown in the following diagrams. Different storage methods are used for
decimal notation and scientific notation.
.
E
Scientific notation (C=0001 hex)
Integer part
Positive: Plus sign (2B hex)
Negative: Minus sign (2D hex)
Sign
Total number of characters
If there are more fractional digits in the source data than specified in C+1, the extra digits will be rounded off.
If there are fewer fractional digits, zeroes (ASCII: 30 hex) will added to the end of the source data.
A decimal point (ASCII: 2E hex) is added if the number fractional digits is greater than 0.
Spaces (ASCII: 20 hex) are added if the integer part of the floating-point data is shorter than the integer part of the result (total
number of characters - sign digit - decimal point - fractional digits - E digit).
Fractional
part
Decimal point
Exponential part
0 to 9 are written as 00 to 09.
Letter E (ASCII: 45 hex) is written here.
Positive number: Space (20 hex)
Negative number: Minus sign (2D hex)
Sign
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...