DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-71
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 valid only until another instruction uses the same flag.
In the following example, when X1 is on, the LDF instruction loads C10–C13 (4 binary bits)
into the accumulator. The accumulator contents is logically ANDed with the bit pattern from
Y20–Y23 using the ANDF instruction. The OUTF instruction outputs the accumulator’s
lower four bits to C20–C23.
bbb
K
ANDF
A aaa
Operand Data Type
DL06 Range
B
aaa
bbb
Inputs
X
0-777
-
Outputs
Y
0-777
-
Control Relays
C
0-1777
-
Stage Bits
S
0-1777
-
Timer Bits
T
0-377
-
Counter Bits
CT
177
-
Special Relays
SP
0-777
-
Constant
K
-
1-32
Discrete Bit Flags
Description
SP63
ON if the result in the accumulator is zero.
SP70
ON if the result in the accumulator is negative
ndar
dR
LL
C10
K4
X1
K4
K4
C10
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
C10
C11
C12
C13
Y20
Y21
Y22
Y23
Accumulator
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Acc.
Acc.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0
1 0 0 0
C20
C21
C22
C23
DirectSOFT32
Load the status of 4
consecutive bits (C10-C13)
into the accumulator
ANDF
Y20
K4
And the binary bit pattern
(Y20-Y23) with the value in
the accumulator
OUTF
C20
Copy the value in the lower
4 bits in accumulator to
C20-C23
AND (Y20-Y23)
The unused accumulator bits are set to zero
Location
Constant
Constant
Location
ON
ON ON OFF
ON
OFF
OFF
OFF
ON
OFF
OFF
OFF
C20
K4
LDF
Handheld Programmer Keystrokes
1
B
ENT
1
B
4
E
0
A
0
A
ENT
STR
$
SHFT
ANDST
L
3
D
OUT
GX
SHFT
5
F
5
F
AND
V
SHFT
5
F
NEXT
NEXT
NEXT
NEXT
NEXT
2
C
4
E
ENT
PREV
PREV
0
A
2
C
4
E
ENT
DS
Used
HPP Used
Direct
SOFT
And Formatted (ANDF)
The ANDF instruction logically ANDs the binary value in
the accumulator with a specified range of discrete memory
bits (1–32). The instruction requires a starting location
(Aaaa) and number of bits (Kbbb) to be ANDed. Discrete
status flags indicate if the result is zero or a negative number
(the most significant bit =1).