EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 265

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
232
Comparison Instructions Section 3-6
Description MCMP(019) compares the contents of the 16 words S
1
through S
1
+15 to the
contents of the 16 words S
2
through S
2
+15, and turns ON the corresponding
bit in word R when the contents are not equal.
The content of S
1
is compared to the content of S
2
, the content of S
1
+1 to the
content of S
2
+1, ..., and the content of S
1
+15 to the content of S
2
+15. Bit n of
R is turned OFF if the content of S
1
+n is equal to the content of S
2
+n; bit n of
R is turned ON if the contents are not equal. If the contents of all 16 pairs of
words are the same, the Equals Flag will turn ON after the instruction has
been executed.
Flags
Example When CIO 0.00 is ON in the following example, MCMP(019) compares words
D100 through D115 in order to words D200 through D215 and turns ON the
corresponding bits in D300 when the words are not equal.
R
0: Words are equal.
1: Words aren't equal.
Comparison
Name Label Operation
Error Flag ER OFF
Equals Flag = ON if the result word is 0000.
(The two 16-word sets contain the same data.)
OFF in all other cases.
R: D300
0.00
D100
D200
D300
S1: D100
D101
D102
D103
D104
D105
D106
D107
D108
D109
D110
D111
D112
D113
D114
D115
S2: D200
D201
D202
D203
D204
D205
D206
D207
D208
D209
D210
D211
D212
D213
D214
D215

Table of Contents

Related product manuals