beautypg.com

Function hint, Precautions, Sample program – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 148: 2 instructions

background image

2 Instructions

2-112

CP1E CPU Unit Instructions Reference Manual(W483)

Function

Hint

The same word can be specified for both S and D to copy a bit within a word.

Precautions

The other bits in the destination word are left unchanged.

Sample program

When CIO 0.00 is ON in the following example, the 5

th

bit of the source word (W0) is copied to the 12

th

bit of the destination word (W100) in accordance with the control word’s value of 0C05.

MOVB(082) copies the specified bit (n) from S
to the specified bit (m) in D.

C

m

n

S

n

D

m

MOVB

W0

D200

W100

0.00

S

C

D

D:W100

0

1

14

15

S:W0

0

1

5

14

15

C:D200

0C

05

0

7

8

7

8

7

8

15

12

This manual is related to the following products: