14 byte swap (bswap), 1 ) operation, 2 ) format – Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 207: 3 ) programming example

Advertising
background image

5.7 Data Shift Instructions

5.7.14 Byte Swap (BSWAP)

5-138

5.7.14 Byte Swap (BSWAP)

( 1 ) Operation

The BSWAP instruction swaps the upper byte and lower byte of the target register.

( 2 ) Format

∗ C and # registers cannot be used.

( 3 ) Programming Example

In the following programming example, the upper byte and lower byte of MW00000 are swapped when switch 1
(DB000000) turns ON.

Œ

If MW00000 is 00FF hex, MW00000 will be FF00 hex after execution of the BSWAP instruction.

ab

Target register

(word data)

Lower byte

Upper byte

cd

cd

Target register

(word data)

Lower byte

Upper byte

ab

Parameter Name

Applicable Data Types

B

W

L

F

A

Index

Constant

Target register (Dest)

×

{

*

×

×

×

×

×

Target register

Icon:

Key entry: BSWAP

Advertising
This manual is related to the following products: