Module 9051 Conversion Of Binary Numbers → Ascii - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

December 2001
Module 9051 Conversion of binary numbers → ASCII
Module 9051 converts a binary numerical value into an ASCII-coded decimal
number in the specified format and saves it as a string in the specified
address. The number is interpreted as a two's complement. For algebraically
unsigned notation, the TNC converts the absolute value of the number without
putting a sign before the string. For algebraically signed notation, the TNC sets
an algebraic sign ("+" or "–") in front of the string in any event. For notation
in inches, the number is divided by 25.4 before conversion. If the number has
more decimal places than the total that you have specified for the number of
places before and after the decimal point, then the TNC omits the most highly
significant decimal places. In right-aligned notation leading zeros before the
decimal point are replaced by blanks; in left-aligned notation they are
suppressed. Trailing zeroes after the decimal point are always converted.
Constraints:
The decimal character is defined by machine parameter MP7280 as a comma
(MP7280 = 0) or a period (MP7280 = 1).
Call:
PS
B/W/D/K <Numerical value to be converted>
PS
B/W/D/K <Display modes, bit-encoded>
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
Bit 2: Display converted to INCH
Bit 3: Display with sign
PS
B/W/D/K <Number of places after the decimal point>
PS
B/W/D/K <Number of places before the decimal point>
PS
B/W/D/K <String address in which the TNC saves the ASCII-coded
decimal number>
CM
9051
Error recognition:
Marker
Value
M4203
0
1
W1022
2
PLC Modules
Meaning
Number was converted
Error code in W1022
Invalid string address, invalid display mode or invalid
number of places before or after the decimal point
7 – 181

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 430 pa/mTnc 430 mTnc 426 cbTnc 430 caTnc 426 pbTnc 430 pa ... Show all

Table of Contents