Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 267

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Comparison Instructions
Description
Flags
Example
234
Area
Indirect DM addresses
in binary
Indirect DM addresses
in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
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.
Comparison
Name
Label
Error Flag
ER
Equals Flag
=
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.
S
@ D0 to @ D32767
*D0 to *D32767
#0000 to #FFFF
---
(binary)
&0 to &65535
(unsigned deci-
mal)
32768 to 0 to
32767 (signed
decimal)
DR0 to DR15
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
R
1: Data are equal.
0: Data aren't equal.
Operation
OFF
ON if the result word is 0000.
(None of the 16 words in the table equals S.)
OFF in all other cases.
Section 3-6
T
R
DR0 to DR15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents