Multi-Word Compare - Mcmp(19) - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Comparison Instructions
TR
0
00000
25505
25506
25507
5-18-5 MULTI-WORD COMPARE – MCMP(19)
Limitations
Description
Flags
of TR 0 unnecessary. With this type of programming, 10000, 10001, and
10002 are changed only when CMPL(60) is executed.
CMPL(60)
HR 09
010
---
10000
Greater Than
10001
Equal
10002
Less Than
Ladder Symbols
MCMP(19)
@MCMP(19)
TB1
TB2
R
This instruction is available in the CQM1 only.
TB1 and TB1+15 must be in the same data area.
TB2 and TB2+15 must be in the same data area.
DM 6144 to DM 6655 cannot be used for R.
When the execution condition is OFF, MCMP(19) is not executed. When the
execution condition is ON, MCMP(19) compares the content of TB1 to TB2,
TB1+1 to TB2+1, TB1+2 to TB2+2, ..., and TB1+15 to TB2+15. If the first pair
is equal, the first bit in R is turned OFF, etc., i.e., if the content of TB1 equals
the content of TB2, bit 00 is turned OFF, if the content of TB1+1 equals the
content of TB2+1, bit 01 is turned OFF, etc. The rest of the bits in R will be
turned ON.
ER:
One of the tables (i.e., TB1 through TB1+15, or TB2 through TB2+15)
exceeds the data area.
Indirectly addressed DM word is non-existent. (Content of *DM word
is not BCD, or the DM area boundary has been exceeded.)
EQ:
ON if the entire contents of both tables are equal and R=0000.
Address Instruction
00000
LD
00001
OUT
00002
CMPL(60)
00003
AND
00004
OUT
00005
LD
00006
AND
00007
OUT
00008
LD
00009
AND
00010
OUT
TB1: First word of table 1
IR, SR, AR, DM, HR, TC, LR
TB2: First word of table 2
TB1
IR, SR, AR, DM, HR, TC, LR
TB2
R
IR, SR, AR, DM, HR, TC, LR
Section 5-18
Operands
00000
TR
0
HR
09
010
25505
10000
TR
0
25506
10001
TR
0
25507
10002
Operand Data Areas
R: Result word
253

Advertisement

Table of Contents
loading

Table of Contents