Automationdirect.com DirectLOGIC DL205 Series User Manual page 370

Table of Contents

Advertisement

Discrete Bit Flags
SP53
NOTE: Status flags are only valid until another instruction that uses the same flags is executed. The pointer
for this instruction starts at 0 and resides in the accumulator.
In the following example, when X1 is on, the constant value (K6) is loaded into the
accumulator using the Load instruction. This value specifies the length of the table and is
placed in the first stack location after the Load Address instruction is executed. The octal
address 1400 (V1400) is the starting location for the table and is loaded into the accumulator.
The greater than search value is specified in the Find Greater Than instruction. If a value is
found greater than the search value, the offset (from the starting location of the table) where
the value is located will reside in the accumulator. If there is no value in the table that is
greater than the search value, a zero is stored in the accumulator and SP53 will come ON.
DirectSOFT
X1
LD
Load the constant value 6
(HEX) into the lower 16 bits
of the accumulator
LDA
Convert octal 1400 to HEX
300 and load the value into
the accumulator
FDGT
Find the value in the table
greater than the specified value
Handheld Programmer Keystrokes
$
B
STR
1
L
D
SHFT
ANDST
3
L
D
SHFT
ANDST
3
F
D
SHFT
5
3
Operand Data Type
V-memory
Constant
On if there is no value in the table that is equal to the search value.
Begin here
K6
O1400
K8989
ENT
G
PREV
ENT
6
A
B
E
A
0
1
4
0
G
T
I
NEXT
6
MLR
8
Chapter 5: Standard RLL Instructions - Table
DL260 Range
A
aaa
V All (See page 3 - 56)
K 0-FFFF
Description
0
1
2
3
V1400
0
0
5
0
0
V1401
1
9
9
9
9
V1402
2
3
0
7
4
V1403
3
8
9
8
9
V1404
4
1
0
1
0
V1405
5
X
X X
X
V1406
X
X X
X
V1407
A
ENT
0
J
I
J
ENT
9
8
9
DL205 User Manual, 4th Edition, Rev. B
Table length
Accumulator
0
0
0
0
0
0
0
V1402 contains the location
where the first value greater
than the search value was
found. 9999 was the 2nd
location after the start of the
specified table.
5–153
1
2
3
4
5
6
7
8
9
10
2
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?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF