EasyManuals Logo

Automationdirect.com DirectLOGIC DL205 Series User Manual

Automationdirect.com DirectLOGIC DL205 Series
587 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #280 background imageLoading...
Page #280 background image
DL205 User Manual, 4th Edition, Rev. B
5–63
Chapter 5: Standard RLL Instructions - Accumulator/Stack Load and Output Data
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Load Accumulator Indexed from Data Constants
(LDSX)
The Load Accumulator Indexed from Data Constants is a
16-bit instruction. The instruction specifies a Data Label
Area (DLBL) where numerical or ASCII constants are stored.
This value will be loaded into the lower 16 bits.
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
accumulator stack as a HEX value.
Helpful hint: — The Load Address instruction can be used to convert octal to HEX and load
the value into the accumulator.
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.
Operand Data Type DL240 Range DL250-1 Range DL260 Range
aaa aaa aaa
Constant K 1-FFFF 1-FFFF 1-FFFF
LDSX
K aaa
230
2
40
250-1
260
ý
þ
þ
þ
LD
K1
X1
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
END
K2
NCON
K3333
NCON
K2323
NCON
K4549
Acc.
0000 0001
Hexadecimal
0001
The unused accumulator
bits are set to zero
Value in 1st. level of stack is
used as offset. The value is 1
Offset 0
Offset 1
Offset 2
V2000
Acc.
2 3 2 3
0000 2 3 2 3
00000001
Level 1
XXXXXXXX
Level 2
XXXXXXXX
Level 3
XXXXXXXX
Level 4
XXXXXXXX
Level 5
XXXXXXXX
Level 6
XXXXXXXX
Level 7
XXXXXXXX
Level 8
Accumulator Stack
Acc.
0000 0002
K
Constant
0002
The unused accumulator
bits are set to zero
The unused accumulator
bits are set to zero
Copy the value in the lower
16 bits of the accumulator
to V2000
OUT
V2000
.
.
.
DLBL
DS Used
HPP Used

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Automationdirect.com DirectLOGIC DL205 Series Specifications

General IconGeneral
BrandAutomationdirect.com
ModelDirectLOGIC DL205 Series
CategoryController
LanguageEnglish

Related product manuals