EasyManua.ls Logo

Automationdirect.com DL06 - Page 310

Automationdirect.com DL06
533 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-149
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
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.
Handheld ProgrammerKeystrokes
STR X(IN) 1
LD K(CON) 6
LDSHFTA OCT 1 4 0 0
SHFT F D G T SHFT K(CON) 8 9 8 9
DirectSOF
T
32 Display
LD
K
6
X1
Load theconstantvalue 6
(HEX)intothe lower16bits
of theaccumulato
r
LDA
O 1400
Convertoctal 1400 to HEX
300 andloadthe valueinto
theaccumulator.
FDGT
K8989
Find thevalue in thetable
greaterthanthe specifiedvalue
V1400
012 3
V1401050 0
V1402
999 9
V1403
307 4
V1404
898 9
V1405
101 0
V1406
XXX X
V1407
XXX X
S
S
S
S
Ta blelength
0002
Accumulator
V1402 contains thelocation
wherethe firstvalue greater
than thesearchvalue was
found. 9999 wasthe 2nd
location afterthe startofthe
specifiedtable.
0000
Beginhere
0
1
2
3
4
5
Handheld Programmer Keystrokes
STR
$
SHFT
ANDST
L
3
D
SHFT
5
F
3
D
6
G
PREV
MLR
T
1
B
ENT
6
G
0
A
0
A
ENT
SHFT
ANDST
L
3
D
1
B
4
E
0
A
ENT
8
I
9
J
ENT
NEXT
8
I
9
J
Operand Data Type DL06 Range
A
aaa
V-memory V See memory map
Constant K 0–FF
Discrete Bit Flags Description
SP53 On if there is no value in the table that is equal to the search value.
DirectSOFT