Omron C200HX Manuel D’Utilisation

Page de 564
192
Example
The following example copies the contents of the 300 words from DM 0000
through DM 0299 to EM 2000 through EM 2299 in the EM bank 01.
(EM bank 00 isn’t used as the source because S isn’t a constant.)
BXF2(––)
DM 1000
DM 0000
#2000
00000
Address
Instruction
Operands
00200
LD
00000
00201
BXF2(––)
DM
1000
DM
0000
#
2000
0
C: DM 1000
0
1
0
Source bank number (00)
Destination bank number (01)
0
C+1: DM 1001
3
0
Number of words (300)
0
5-17 Data Comparison
5-17-1
MULTI-WORD COMPARE – MCMP(19)
TB1: First word of table 1
IR, SR, AR, DM, HR, TC, LR
TB2: First word of table 2
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R: Result word
IR, AR, DM, HR, TC, LR
MCMP(19)
TB1
TB2
R
@MCMP(19)
TB1
TB2
R
Limitations
TB1 and TB1+15 must be in the same data area, as must TB2 and TB2+15.
Description
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.
Flags
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.)
Data Comparison
Section 5-17