315
Comparison Instructions Section 3-7
3-7-7 MULTIPLE COMPARE: MCMP(019)
Purpose Compares 16 consecutive words with another 16 consecutive words and
turns ON the corresponding bit in the result word where the contents of the
words are not equal.
Ladder Symbol
Variations
Applicable Program Areas
Operands S
1
: First word of set 1
Specifies the beginning of the first 16-word range. S
1
and S
1
+15 must be in
the same data area.
S
2
: First word of set 2
Specifies the beginning of the second 16-word range. S
2
and S
2
+15 must be
in the same data area.
R: Result word
Each bit of R contains the result of a comparison between two words in the
16-word sets. Bit n of R (n = 00 to 15) contains the result of the comparison
between words S
1
+n and S
2
+n.
(1)
(0)
(0)
>
=
<
1234 5678
ABCD EF12
D0001
D0005
Flag status
Comparison
MCMP(019)
S
1
S
2
R
S
1: First word of set 1
S
2: First word of set 2
R: Result word
Variations Executed Each Cycle for ON Condition MCMP(019)
Executed Once for Upward Differentiation @MCMP(019)
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification Not supported
Block program areas Step program areas Subroutines Interrupt tasks
OK OK OK OK
15 014
R
1
Comparison result for S1 and S2
Comparison result for S1+1 and S2+1
Comparison result for S
1+14 and S2+14
Comparison result for S
1+15 and S2+15