Automationdirect.com DirectLOGIC DL205 Series User Manual page 298

Table of Contents

Advertisement

Exclusive OR Formatted (XORF)
The Exclusive Or Formatted instruction performs an exclusive OR
230
of the binary value in the accumulator and a specified range of
discrete memory bits (1 to 32).
240
250-1
The instruction requires a starting location (Aaaa) and the number
of bits (Kbbb) to be exclusive ORed. Discrete status flags indicate if
260
the result of the Exclusive Or Formatted is zero or negative (the most
significant bit is on).
DS
Used
HPP Used
Operand Data Type
Inputs
Outputs
Control Relays
Stage bits
Timer bits
Counter bits
Special Relays
Global I/O
Constant
Discrete Bit Flags
SP63
SP70
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the binary pattern of C10–C13 (4 bits) will be
loaded into the accumulator using the Load Formatted instruction. The value in the
accumulator will be logically Exclusive Ored with the bit pattern from Y20–Y23 using the
Exclusive Or Formatted instruction. The value in the lower 4 bits of the accumulator are
output to C20–C23 using the Out Formatted instruction.
DirectSOFT32
X1
LDF
Load the status of 4
consecutive bits (C10-C13)
into the accumulator
X0RF
Exclusive OR the binary bit
pattern (Y20-Y23) with the
value in the accumulator
OUTF
Copy the specified number
of bits from the accumulator
to C20-C23
Handheld Programmer Keystrokes
$
B
STR
1
L
D
SHFT
ANDST
3
X
Q
SHFT
SET
OR
GX
F
SHFT
OUT
5
A
X
Y
C
S
T
CT
SP
GX/GY
K
Will be on if the result in the accumulator is zero
Will be on if the result in the accumulator is negative
C10
K4
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
Y20
0
0
0
0 0
K4
Accumulator
0
0 0
0
Acc.
Y23
Y22
Y21
ON
OFF
ON
XORF (Y20-Y23)
C20
K4
ENT
F
NEXT
NEXT
NEXT
NEXT
5
F
C
A
SHFT
NEXT
5
2
0
C
A
PREV
PREV
2
0
Chapter 5: Standard RLL Instructions - Logical
DL250-1 Range
aaa
bbb
0–777
0–777
0–1777
0–1777
0–377
0–177
0-777
-
-
1–32
Description
Location
C10
The unused accumulator bits are set to zero
15 14 13 12 11 10 9
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 0
Y20
OFF
0
0 0
Acc.
Location
C20
B
A
E
ENT
1
0
4
E
ENT
4
E
ENT
4
DL205 User Manual, 4th Edition, Rev. B
XORF
K bbb
DL260 Range
aaa
bbb
0–1777
0–1777
0–3777
0–1777
0–377
0–377
0–777
0-3777
-
1–32
Constant
C13
C12
C11
C10
K4
OFF
ON
ON
OFF
8
7 6 5
4 3
2
1
0
0 0
0
0
0
0 0
0
0
0
1 1
0
0
0
0
0 0
0
0
0
0 0
1
1
0
1
0
1
0
0
0
0
0 0
0
0
0
0 1
1
0
0
Constant
C23
C22
C21
C20
K4
ON
ON
OFF
OFF
1
A aaa
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–81

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?

Table of Contents

Save PDF