Number Conversion - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

4.4 Number Conversion

4.4.1 Number Conversion Binary to ASCII (Module 9050)
Converts a binary numerical value consisting of mantissa and exponent to the base 10 to an ASCII-
coded decimal number.
The number specified as mantissa and exponent is converted to a decimal number and stored at the
specified address as a string. The exponent relates to the lowest-value place in the number. A
negative number is detected when the mantissa corresponds to a negative number in the notation
as a two's complement. A sign is only set in front of negative numbers. Trailing zeroes after the
decimal point or leading zeroes before the decimal point are not converted, the string is written left-
justified starting from the specified target address in the string buffer.
Constraints:
- The decimal sign is defined by machine parameter MP7280 as a decimal comma (MP7280 = 0) or
a decimal point (MP7280 = 1).
Possible errors:
- The number of the target string is outside the permitted range (0..3).
- The conversion would result in more than 10 places after the decimal point.
- The conversion would result in more than 10 places before the decimal point.
Call:
PS
K/B/W/D
PS
K/B/W/D
PS
K/B/W/D
CM
9050
Error status after call: M3171 =
Examples:
Mantissa
Exponent
123
0
-123
0
123
2
123
-3
123456
-3
123
-5
100
-3
1234567890
-11
123
-11
123456789
1
123
8
01.98
TNC 407/TNC 415/TNC 425
<Mantissa of numerical value to be converted>
<Exponent to base 10 of the value>
<Number of target string>
0: Number was converted
1: Error condition see above
Decimal number
"123"
"-123"
"12300"
"0.123"
"123.456"
"0.00123"
"0.1"
"0.0123456789"
Error: more than 10 places after decimal
point
"1234567890"
Error: more than 10 places before decimal
point
4 PLC Modules
7-147

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents