DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-148
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 length of the table (up to 255 locations) into the first level of the
accumulator stack. This parameter must be a HEX value, 0–FF.
Step 2: Load the starting V-memory location for the table into the accumulator. This
parameter must be a HEX value.
Step 3: Insert the FDGT instruction which specifies the greater than search value.
Results:— The offset from the starting address to the first V-memory location
which contains the greater than search value (in HEX) which is returned to
the accumulator. SP53 will be set On if the value is not found and 0 will be
returned in the accumulator.
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.
NOTE: This instruction does not have an offset, such as the one required for the FIND instruction.
Direct
S OF T 32 Display
LD
K6
X1
Load the constant value 6
(HE X) into the lower 16 bits
of the accumulator
LDA
O 1400
LD
K2
Load the constant value
2 into the lower 16 bits
of the accumulator
F IND
K8989
F ind the location in the table
where the value 8989 resides
V1400
0
1
2
3
V1401
0
5
0
0
V1402
9
9
9
9
V1403
3
0
7
4
V1404
8
9
8
9
V1405
1
0
1
0
V1406
X
X
X
X
V1407
X
X
X
X
S
S
S
S
Offset
Table length
V1404 contains the location
where the match was found.
The value 8989 was the 4th
location after the start of the
specified table.
0
0
0
4
Accumulator
0
0
0
0
C onvert octal 1400 to HE X
300 and load the value into
the accumulator.
Begin here
1
2
3
4
0
5
F DG T
A aaa
Handheld Programmer Keystrokes
STR
$
SHFT
ANDST
L
3
D
SHFT
5
F
8
I
TMR
N
PREV
3
D
1
B
ENT
6
G
0
A
0
A
ENT
SHFT
ANDST
L
3
D
1
B
4
E
2
C
ENT
8
I
9
J
ENT
SHFT
ANDST
L
3
D
PREV
NEXT
8
I
9
J
Direct
SOFT
Find Greater Than (FDGT)
The Find Greater Than instruction is used to search for the first
occurrence of a value in a V-memory table that is greater than the
specified value (Aaaa), which can be either a V-memory location
or a 4-digit constant. The function parameters are loaded into the
first level of the accumulator stack and the accumulator by two
additional instructions. Listed below are the steps necessary to
program the Find Greater Than function.