Number Conversion Binary To Ascii - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

4.4.2 Number Conversion Binary to ASCII (Module 9051)
Converts a binary numerical value to an ASCII-coded decimal number in the format specified.
The specified number is converted to a decimal number and stored as a string in the specified
address.
The number is notated as a two's complement. When notated without a sign the absolute amount
of the number is converted without a sign being put before the string. With the signed notation a
sign ("+" or "-") is placed before the string in any event.
With the inch notation the numerical value is divided by 25.4 before being converted. If the number
has more decimal places than the total of specified places before and after the decimal point, then
the highest-value decimal places are omitted. With right-justified notation leading zeroes before the
decimal point are replaced by blanks, with left-justified notation they are suppressed. Trailing zeroes
after the decimal point are always converted.
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).
- There are more than 16 decimal places in all (before and after decimal point).
- No places before the decimal point are specified.
Call:
PS
K/B/W/D
<numerical value to be converted>
PS
K/B/W/D
<display mode (bit coded)>
Bit #3: display with sign
Bit #2: display converted to INCH
Bit #1/#0: Format
00: Sign and number left-justified
1: Sign left-justified, number right-justified
10: Sign and number right-justified
11: Not permitted
PS
K/B/W/D
<Number of places after the decimal point>
PS
K/B/W/D
<Number of places before the decimal point>
PS
K/B/W/D
<Target address in string buffer>
CM
9051
Error status after call: M3171 =
7-148
TNC 407/TNC 415/TNC 425
0: Number was converted
1: Error condition see above
4 PLC Modules
01.98

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 425eTnc 415fTnc 407Tnc 415bTnc 425

Table of Contents