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

Table of Contents

Advertisement

Flags
Name
Error Flag
Function
MOVB(082) copies the specified bit (n) from S
to the specified bit (m) in D. The other bits in
the destination word are left unchanged.
Hint
The same word can be specified for both S and D to copy a bit within a word.
Precautions
If the number of digits being read or written exceeds the leftmost digit of S or D, MOVD(083) will wrap to
the rightmost digit of the same word.
Example Programming
When CIO 0.00 is ON in the following example, four digits of data are copied from CIO 200 to CIO 300.
The transfer begins with the digit 1 of CIO 200 and digit 0 of CIO 300, in accordance with the control
word's value of 31.
0.00
D300
Note After reading the leftmost digit of S (digit 3), MOVD(083) wraps to the rightmost digit (digit 0).
Example of transferring multiple digits
The following diagram shows examples of data transfers for various values of C.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
ER
• ON if one of the first three digits of C is not within the specified range of 0 to 3.
• OFF in all other cases.
200
300
Digit no.
S:200
Digit no.
D:300
Operation
C:D300
First digit in S: Digit 1
Number of digits: 3 (4 digits)
First digit in D: Digit 0
3. Instructions
3
289

Advertisement

Table of Contents
loading

Table of Contents