Conversion Binary To Ascii/Hexadecimal; Conversion Ascii/Hexadecimal To Binary - HEIDENHAIN TNC 415 Technical Manual

Hide thumbs Also See for TNC 415:
Table of Contents

Advertisement

4.4.4 Conversion Binary to ASCII/Hexadecimal (Module 9053)
Converts a block of binary values from the word marker range into a string of ASCII coded
hexadecimal numbers.
The specified number of bytes is read from the place specified by the source address and converted
to a hexadecimal-coded ASCII string. Each byte in the source block makes 2 characters in the
destination string. the destination string is identified by the destination string number.
Possible errors:
- The address for the source block is outside the range 0 to 1023.
- The number of the destination string is outside the valid range (0..3).
Call:
PS
K/B/W/D
<Source address in Word-RAM>
PS
K/B/W/D
<Number of destination string>
PS
K/B/W/D
<Number of data bytes>
CM
9053
Example:
S0 = Hex 63
6
B0 = 99
0110 0011
Error status after call: M3171 =
4.4.5 Conversion ASCII/Hexadecimal to Binary (Module 9054)
Converts a string of ASCII coded hexadecimal values to a block of binary values in the word marker
range.
The string in the string buffer with the specified number is interpreted as a chain of ASCII coded
hexadecimal numbers and converted into a block of corresponding binary bytes. Two ASCII
characters make one binary byte. The binary block is stored in the word marker range starting from
the specified destination address.
Possible errors:
- The number of the source string is outside the permitted range (0..3).
- The address for the destination block is outside the range 0 to 1023.
- The source string contains characters that cannot be interpreted as hexadecimal values (different
characters 0..9, A..F).
- The source string contains an uneven number of characters (the last byte is not fully defined).
- The destination block has no room at the specified address.
7-150
TNC 407/TNC 415/TNC 425
3
0: String 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

Save PDF