3 ) programming example – Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 184

Advertising
background image

5.7 Data Shift Instructions

5.7.2 Bit Rotate Right (ROTR)

5-115

Instructions

5

( 3 ) Programming Example

In the following programming example, the data specified as 8 bits wide from the first bit address at MB000000 is
rotated two bits to the right.
The ROTR instruction is executed when switch 1 (DB000000) turns ON.

The following figure shows the operation when MW00000 is 12,345 (3039 hex).

0

Bit 0

Bit 7

Bit F

Bit 3

Bit B

Bit 4

Bit 8

Bit C

Before Execution
MW00000
(3039 hex)

0

1

1

0

0

0

0

0

0

1

1

1

0

0

1

0

0

1

1

0

0

0

0

0

1

0

0

1

1

1

0

Rotated 2 bits to the right.

Data specified by the first

bit address and bit width

After Execution
MW00000
(304E hex)

Advertising
This manual is related to the following products: