Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 327

Table of Contents

Advertisement

Function
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
diagram.
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.
Example Programming
When CIO 0.00 is ON in the following example, the 20 bits beginning with CIO 200.06 are copied to the
20 bits beginning with CIO 300.
0.00
CS/CJ/NSJ Series Instructions Reference Manual (W474)
D100
S:200
D:300
C:D100
20 bits
3. Instructions
3
291

Advertisement

Table of Contents
loading

Table of Contents