Delta AH500 Programming Manual page 369

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

API
Instruction code
W
0804
XOR
D
Device X
Y
M
S
1
S
2
D
Symbol:
Explanation:
1.
The logical operator XOR takes the binary representations in S
logical exclusive OR operation on each pair of corresponding bits. The operation result is
stored in D.
2.
Only the instruction DXOR can use the 32-bit counter.
3.
The result in each position is 1 if the two bits are different, and 0 if they are the same.
Example 1:
When X0.0 is ON, the logical operator XOR takes the data in the 16-bit device Y0 and the 16-bit
device Y2, and performs the exclusive OR operation on each pair of corresponding bits. The
operation result is stored in Y4.
Before the instruction
is executed
After the i nstruction
is executed
Operand
S
, S
, D
P
1
2
S
T
C
HC
D
Pulse instruction 16-bit instruction (7 steps) 32-bit instruction (7 steps)
AH500
: Data source 1
S
1
: Data source 2
S
2
D : Operation result
b15
S1
Y0
S2
Y2
b15
Y4
D
C ha pt er 6 A p pl i e d In s tr uc t io ns
Logical exclusive OR operation
L
SM SR
E
PR
AH500
Word/Double word
Word/Double word
Word/Double word
and S
1
011 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1
0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0
Function
K
16# "$"
DF
AH500
, and performs the
2
b0
b0
6 - 2 0 1

Advertisement

Table of Contents
loading

Table of Contents