Automationdirect.com DirectLOGIC DL205 Series User Manual page 355

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Number Conversion
DirectSOFT
1
X1
LD
2
LDA
3
ATH
4
Handheld Programmer Keystrokes
5
$
B
STR
1
L
D
SHFT
6
ANDST
3
L
D
SHFT
ANDST
3
A
T
7
SHFT
0
MLR
HEX to ASCII (HTA)
8
The HEX to ASCII instruction converts a table of HEX
230
values to a specified table of ASCII values. HEX values are
one digit and their ASCII equivalents are two digits.
240
9
250-1
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
260
10
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
11
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
DS
Used
12
HPP
N/A
Step 2: Load the starting V-memory location for the HEX table into the accumulator. This parameter
13
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,
14
the LDA instruction can be used to convert an octal address to the HEX equivalent and load
the value into the accumulator.
A
B
C
D
5–138
DL205 User Manual, 4th Edition, Rev. B
Load the constant value
into the lower 16 bits of the
K4
accumulator. This value
defines the number of V
memory locations 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
A
B
E
A
1
4
0
0
H
B
G
A
7
1
6
0
accumulator stack.
must be a HEX value.
Operand Data Type
V-memory
ASCII TABLE
V1400
V1401
V1402
A
ENT
0
V1403
A
ENT
0
DL250-1 Range
aaa
V
All (See page 3 - 55)
Hexadecimal
Equivalents
33 34
31 32
37 38
35 36
HTA
V
aaa
DL260 Range
aaa
All (See page 3 - 56)
1234
V1600
5678
V1601

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF