EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 267

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...
234
Comparison Instructions Section 3-6
Description TCMP(085) compares the source data (S) to each of the 16 words T through
T+15 and turns ON the corresponding bit in word R when the data are equal.
Bit n of R is turned ON if the content of T+n is equal to S and it is turned OFF
if they are not equal.
S is compared to the content of T and bit 00 of R is turned ON if they are
equal or OFF if they are not equal, S is compared to the content of T+1 and bit
01 of R is turned ON if they are equal or OFF if they are not equal, ..., and S is
compared to the content of T+15 and bit 15 of R is turned ON if they are equal
or OFF if they are not equal.
Flags
Example When CIO 0.00 is ON in the following example, TCMP(085) compares the
content of D100 with the contents of words D200 through D215 and turns ON
the corresponding bits in D300 when the contents are equal or OFF when the
contents are not equal.
Indirect DM addresses
in binary
@ D0 to @ D32767
Indirect DM addresses
in BCD
*D0 to *D32767
Constants #0000 to #FFFF
(binary)
&0 to &65535
(unsigned deci-
mal)
32768 to 0 to
32767 (signed
decimal)
---
Data Registers DR0 to DR15 --- DR0 to DR15
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area S T R
R
1: Data are equal.
0: Data aren't equal.
Comparison
Name Label Operation
Error Flag ER OFF
Equals Flag = ON if the result word is 0000.
(None of the 16 words in the table equals S.)
OFF in all other cases.

Table of Contents

Related product manuals