Omron C200HS Garage Door Opener User Manual


 
169
Example In the following example, XFRB(62) is used to transfer 5 bits from IR 020 to
LR 21 when IR 00001 is ON. The starting bit in IR 020 is 0, and the starting bit in
LR 21 is 4, so IR 02000 to IR 02004 are copied to LR 2104 to LR 2108.
XFRB(62)
#0540
IR 020
LR 21
00001
Address Instruction Operands
00000 LD 00001
00001 XFRB(62)
# 0540
020
LR 21
010101000001
0100010 0001
S (IR 020)
D (LR 21)
Bit
15
Bit
15
Bit
00
Bit
00
0 1 1 1
1 0 1 1 1
Flags ER: The specified source bits are not all in the same data area.
The specified destination bits are not all in the same data area.
Indirectly addressed DM word is non-existent. (Content of DM word is
not BCD, or the DM area boundary has been exceeded.)
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