Automationdirect.com DirectLOGIC DL205 Series User Manual page 280

Table of Contents

Advertisement

Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
Load Accumulator Indexed from Data Constants
(LDSX)
The Load Accumulator Indexed from Data Constants is a
230
16-bit instruction. The instruction specifies a Data Label
240
Area (DLBL) where numerical or ASCII constants are stored.
250-1
This value will be loaded into the lower 16 bits.
260
The LDSX instruction uses the value in the first level of the accumulator stack as an offset to
determine which numerical or ASCII constant within the Data Label Area will be loaded into
the accumulator. The LDSX instruction interprets the value in the first level of the
DS
Used
accumulator stack as a HEX value.
HPP Used
Helpful hint: — The Load Address instruction can be used to convert octal to HEX and load
the value into the accumulator.
Operand Data Type
Constant
NOTE: Two consecutive Load instructions will place the value of the first load instruction onto the
accumulator stack.
In the following example when X1 is on, the offset of 1 is loaded into the accumulator. This
value will be placed into the first level of the accumulator stack when the LDSX instruction is
executed. The LDSX instruction specifies the Data Label (DLBL K2) where the numerical
constant(s) are located in the program and loads the constant value, indicated by the offset in
the stack, into the lower 16 bits of the accumulator.
X1
.
.
.
DLBL
K2
DL240 Range
K
1-FFFF
LD
K1
Load the offset value of 1 (K1) into the lower 16
bits of the accumulator.
LDSX
K2
Move the offset to the stack.
Load the accumulator with the data label
number
OUT
V2000
Copy the value in the lower
16 bits of the accumulator
to V2000
END
NCON
Offset 0
K3333
NCON
Offset 1
K2323
NCON
Offset 2
K4549
DL205 User Manual, 4th Edition, Rev. B
DL250-1 Range
aaa
aaa
1-FFFF
Hexadecimal
0
0
0
1
The unused accumulator
bits are set to zero
Acc. 0
0
0
0
0
0
0
1
Constant
K
0
0
0
2
The unused accumulator
bits are set to zero
Acc. 0
0
0
0
0
0
0
2
The unused accumulator
bits are set to zero
0
0
0
0
2
3
2
3
Acc.
2
3
2
3
V2000
LDSX
K aaa
DL260 Range
aaa
1-FFFF
Value in 1st. level of stack is
used as offset. The value is 1
Accumulator Stack
Level 1
0
0
0
0
0
0
0
1
X
X
X
X X
X
X
X
Level 2
X
X
X
X X
X
X
X
Level 3
X
X
X
X X
X
X
X
Level 4
Level 5
X
X
X
X X
X
X
X
Level 6
X
X
X
X X
X
X
X
Level 7
X
X
X
X X
X
X
X
Level 8
X
X
X
X X
X
X
X
5–63
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D

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?

Table of Contents

Save PDF