8. Function Commands
DXOR, DXORP
- 245 -
Execution conditions
The execution conditions for DXOR, DXORP are as follows.
Operation command OFF
DXOR
ON
Executed per scan
Executed per scan
DXORP
Program example
(1) Program to compare the X20 to 3F 32-bit data and the D9, 10 data when X6 turns ON, and to
store the No. of unmatched bits in D16.
K8X20
DXOR D9
X6
10
DSUM
D9
Exclusive OR the X20 to 3F 32-bit data
and D9, 10 data.
Store the total No. of "1" bits of
the D9 32-bit data in D16.
D16
Coding
No. of
steps
Com-
mand
Device
10 LD X6
11 DXOR K8X20 D9
14 DSUM D9 D16
18