DirectSOFT 5
Direct SOFT32
X1
LD
LDA
ATH
Handheld Programmer Keystrokes
$
B
STR
1
L
D
SHFT
ANDST
3
L
D
SHFT
ANDST
3
A
T
SHFT
0
MLR
HEX to ASCII (HTA)
The HEX to ASCII instruction converts a table
DS5
Used
of HEX values to a specified table of ASCII
HPP
Used
values. HEX values are one digit and their ASCII
equivalents are two digits.
This means a HEX table of two V-memory locations would require four V-memory locations
for the equivalent ASCII table. The function parameters are loaded into the accumulator stack
and the accumulator by two additional instructions. Listed below are the steps necessary to
program a HEX to ASCII table function. The example on the following page shows a program
for the HEX to ASCII table function.
Step 1: — Load the number of V-memory locations in the HEX table into the first level of the
accumulator stack.
Step 2: — Load the starting V-memory location for the HEX table into the accumulator. This
parameter must be a HEX value.
Step 3: — Specify the starting V-memory location (Vaaa) for the ASCII table in the HTA
instruction.
Helpful Hint: — For parameters that require HEX values when referencing memory locations,
the LDA instruction can be used to convert an octal address to the HEX equivalent and load
the value into the accumulator.
Load the constant value
into the lower 16 bits of the
K4
accumulator. This value
defines the number of V
memory location in the
ASCII table
Convert octal 1400 to HEX
300 and load the value into
O 1400
the accumulator
V1600 is the starting
location for the HEX table
V1600
ENT
E
PREV
ENT
4
B
E
A
A
A
0
1
4
0
H
B
G
A
A
7
1
6
0
DL05 Micro PLC User Manual, 6th Edition, Rev. D
Chapter 5: Standard RLL Instructions
ASCII TABLE
33 34
V1400
31 32
V1401
37 38
V1402
35 36
ENT
0
V1403
ENT
0
Hexadecimal
Equivalents
1234
V1600
5678
V1601
HTA
V
aaa
5-91
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
A
a
b
B
c
C
D
D
Need help?
Do you have a question about the DL05 and is the answer not in the manual?