Module 9054 Conversion From Ascii/Hexadecimal → Binary - HEIDENHAIN TNC 426 PB/M Technical Manual

Table of Contents

Advertisement

Example
Function
Push string address
S0 onto the data
stack
Push word address
B0 onto the data
stack
Conversion of the
two ASCII characters
6 and 3 into the
binary number 99
December 2001
Module 9054 Conversion from ASCII/hexadecimal → binary
Module 9054 converts strings of ASCII-coded hexadecimal values into a block
of binary values in the word-marker range. The string in the specified string
memory is interpreted as a sequence of ASCII-coded hexadecimal numbers
and converted into a block of corresponding binary bytes. Two ASCII
characters produce one binary byte. The TNC saves the binary block beginning
at the specified address in the word-marker range.
Call:
PS
B/W/D/K <String address in which the hexadecimal value is saved>
PS
B/W/D/K <Word address from which the TNC saves the binary
values>
CM
9054
Error recognition:
Marker
Value
M4203
0
1
W1022
2
11
Initial state:
SO
= "63"
BO
= 99
STL
PS K+0
PS B0
CM 9054
PLC Modules
Meaning
Number was converted
For error see W1022
Invalid string address
Invalid word address
Odd number of characters in the string or a character
that cannot be interpreted as hexadecimal
String accu. (characters), or logic accu. [bit]
1
6 3
..128
7 .................. 0
x x x x x x x x
0 1 1
0 0 0 1
1
6
3
7 – 183

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