114
D320 PLC User's Manual
Instruction
Mnemonic
Bit Exclusive OR Operation
Range
Bit
■
Word
XOR
DXOR
Bit exclusive OR operation
■
Double words
Ladder
Process S1 and S2 in bit exclusive OR operation and store the
result in D.
S1
S2
D
0
0
0
0
1
1
1
0
1
1
1
0
Description
1. Process S1 and S2 (word/double word) by bit exclusive OR operation and store the result
in D.
For example: S1 = $00FF (hex)
S2 = $3333 (hex)
D = $33CC (hex)
2. This operation will occur on every scan for which the input condition is true (On). To perform
the operation only on a change of input condition, use the rising/falling edge contact.
Example
Program Expression
Operation Results
Initial conditions:
W0 = $00FF
W1 = $3333
W2 = $XXXX
Operation results:
W0 = $00FF
W1 = $3333
W2 = $33CC
XOR
D =
S1 =
S2 =
R
R
DXOR
D =
S1 =
S2 =
S1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
S2 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
D 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 0
XOR (Exclusive OR)
XOR
D = W2
S1 = W0
S2 = W1
R0.0
R
Содержание D320 PLC
Страница 1: ...D320 PLC User s Manual...
Страница 18: ...6 D320 PLC User s Manual...
Страница 28: ...16 D320 PLC User s Manual...
Страница 34: ...22 D320 PLC User s Manual...
Страница 78: ...66 D320 PLC User s Manual...
Страница 176: ...164 D320 PLC User s Manual...
Страница 210: ...198 D320 PLC User s Manual...
Страница 258: ...246 D320 PLC User s Manual...