Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2 Instructions
2-116
CP1E CPU Unit Instructions Reference Manual(W483)
Function
Hint
Up to 255 bits of data can be transferred per execution of XFRB(062).
It is possible for the source words and destination words to overlap. By transferring data overlapping
several words, the data can be packed more efficiently in the data area. (This is particularly useful
when handling position data for position control.)
Since the source words and destination words can overlap, XFRB(062) can be combined with
ANDW(034) to shift m bits by n spaces.
Precautions
Be sure that the source words and destination words do not exceed the end of the data area.
When the number of transfer bits (n of C) is 0, transfer does not take place.
Bits in the destination words that are not overwritten by the source bits are left unchanged.
Sample program
When CIO 0.00 is ON in the following example, the 20 bits beginning with W0.06 are copied to the 20
bits beginning with W100.
XFRB(062) transfers up to 255 consecutive
bits from the source words (beginning with bit
l of S) to the destination words (beginning with
bit m of D).
The beginning bits and number of bits are
specified in C, as shown in the following dia-
gram.
S
l
n
D
m
Cn
815
ml
0347
XFRB
D100
W0
W100
0.00
C
S
D
C:D100 1 4
815
06
03
47
S:W0
W1
01234561415
78
D:W100
W101
015
20 bits