4 move word (movw), 1 ) operation – Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 187

Advertising
background image

5.7 Data Shift Instructions

5.7.4 Move Word (MOVW)

5-118

5.7.4 Move Word (MOVW)

( 1 ) Operation

The MOVW instruction moves the specified number of words from the area that starts with the first source address to
the area that starts with the first destination address.

ΠThe words are moved one at a time from the lowest register address.

If the source area and destination area overlap, the source data that is actually moved may not be the data that was in
the source area before the instruction was executed.

„

Example Where the Source Area and Destination Area Overlap

6

5

4

3

2

1

6

5

4

3

2

1

Source area

Destination area

Word data moved.

First source address

First destination address

Number of words to move m

0

m

Number of words to move m

d

c

b

a

0

0

0

0

0

b

a

b

a

0

0

b

a

0

0

3

4

7

1

8

2

5

6

Source area

(shaded portion)

Destination area

(shaded portion)

Overlap

Word contents are moved in the following order:

c

to

f

. This means that the contents

of MW00002 and MW00003 are moved to MW00004 and MW00005 (

c

and

d

) and

then the contents of MW00004 and MW00005 are moved (

e

and

f

).

First source address:
MW00002

First destination address:
MW00004

0

0

F

c

d

e

f

Advertising
This manual is related to the following products: