Number Conversion Ascii To Binary - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

Examples:
Binary
Mode
Before
value
Dec.
123
0
3
123
0
3
123
8
3
123
9
3
123
10
3
254
0
3
254
4
3
1000
9
3
-1000
9
3
123456
0
3
4.4.2 Number Conversion ASCII to Binary (Module 9052)
Converts an ASCII coded decimal number (possibly with places after the decimal point) into a
mantissa and an exponent to the base 10.
The string identified by the source string number is read and converted to a signed number and an
exponent to the base 10. If the sign is missing the number is detected as positive. Both the comma
and the point are accepted as the decimal character. If the full extent of the mantissa cannot be
notated in a doubleword then the last places are omitted and the exponent corrected accordingly. If
possible the exponent is adjusted to correspond with the ASCII notation of the number.
Possible errors:
- The number of the source string is outside the valid range (0..3).
- The source string does not contain a string that can be interpreted as a number.
- The string overflows the end of the string buffer, 128 characters were read without an end of
string being found.
Call:
PS
K/B/W/D
<Number of source string>
CM
9052
PL
B/W/D
<Numerical value>
PL
B/W/D
<Exponent 10Exx>
Error status after call: M3171 =
01.98
TNC 407/TNC 415/TNC 425
After
Dec. Number
Dec.
0
"123"
2
"1.23"
2
"+1.23"
2
"+ 1.23"
2
" +1.23"
1
"254.0"
1
"10.0"
3
"+ 1.000"
3
"- 1.000"
0
"456"
0: String was converted
1: Error condition see above
4 PLC Modules
7-149

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents