DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-146
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Listed below are the steps necessary to program the Fill function.
Step 1: Load the number of V-memory locations to be filled 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 Fill instruction which specifies the value to fill the table with.
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.
In the following example, when X1 is on, the constant value (K4) is loaded into the accumulator
using the Load instruction. This value specifies the length of the table and is placed on the first
level of the accumulator stack when the Load Address instruction is executed. The octal address
1600 (V1600) is the starting location for the table and is loaded into the accumulator using
the Load Address instruction. The value to fill the table with (V1400) is specified in the Fill
instruction.
FILL
A aaa
Handheld ProgrammerKeystrokes
DirectSOFT32
LD
K4
X1
Load thecons tant value 4
(HEX)intothe lower16bits
of the accumulator
LDA
O 1600
Convertthe octaladdress
1600 to HE X 380 andloadthe
value into the accumulator
FILL
V1400
Fill thetable with the value
in V1400
V1576XXXX
V1577
XXXX
V1600
2500
V16012500
V1602
2500
V16032500
V1604
XXX X
V1605
XXXX
S
S
S
S
2500
V1400
STR
$
SHFT
ANDST
L
3
D
SHFT
5
F
8
I
ANDST
L
PREV
ANDST
L
1
B
ENT
4
E
0
A
0
A
ENT
SHFT
ANDST
L
3
D
1
B
6
G
0
A
ENT
0
A
1
B
4
E
0
A
ENT
Discrete Bit Flags Description
SP53 On if the V-memory address is out of range.
DS Used
HPP Used
DirectSOFT
Fill (FILL)
The Fill instruction fills a table of up to 255 V-memory locations
with a value (Aaaa), which is 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