Omron C200HG Computer Hardware User Manual


 
190
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-16-11 EM BLOCK TRANSFER XFR2(––)
N: Number of words (BCD)
IR, SR, AR, DM, HR, TC, LR, #
S: Starting source word
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
D: Starting destination word
IR, SR, AR, DM, HR, TC, LR, #
XFR2(––)
N
S
D
@XFR2(––)
N
S
D
Limitations S and S+N must be in the same data area, as must D and D+N.
N must be BCD.
Description When the execution condition is OFF, XFR2(––) is not executed. When the
execution condition is ON, XFR2(––) copies the contents of S, S+1, ..., S+N to D,
D+1, ..., D+N. If a constant is used for S or D, the constant specifies an address in
the current EM bank.
Flags ER: N is not BCD.
S and S+N or D and D+N are not 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.)
Data Movement Section 5-16