DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-134
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Step 1: Load the number of V-memory locations for the ASCII table into the first level of the
accumulator stack.
Step 2: Load the starting V-memory location for the ASCII table into the accumulator. This
parameter must be a HEX value.
Step 3: Specify the starting V-memory location (Vaaa) for the HEX table in the ATH
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.
In the example on the following page, when X1 is ON the constant (K4) is loaded into the
accumulator using the Load instruction and will be placed in the first level of the accumulator
stack when the next Load instruction is executed. The starting location for the ASCII table
(V1400) is loaded into the accumulator using the Load Address instruction. The starting
location for the HEX table (V1600) is specified in the ASCII to HEX instruction. The table
below lists valid ASCII values for ATH conversion.
aaa
ATH
V
Operand Data Type
DL06 Range
aaa
V-memory
V
See memory map
Discrete Bit Flags
Description
SP53
On when the value of the operand is larger than the accumulator can work with.
ASCII Values Valid for ATH Conversion
ASCII Value
Hex Value
ASCII Value
Hex Value
30
0
38
8
31
1
39
9
32
2
41
A
33
3
42
B
34
4
43
C
35
5
44
D
36
6
45
E
37
7
46
F
DS
Used
HPP
N/A
ASCII to HEX (ATH)
The ASCII TO HEX instruction converts a table of ASCII values
to a specified table of HEX values. ASCII values are two digits and
their HEX equivalents are one digit. This means an ASCII table
of four V-memory locations would only require two V-memory
locations for the equivalent HEX 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 an ASCII to HEX table function. The example on
the following page shows a program for the ASCII to HEX table
function.