EasyManuals Logo

Omron SYSMAC CP Series Instruction & Reference Manual

Omron SYSMAC CP Series
467 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #290 background imageLoading...
Page #290 background image
2 Instructions
2-254
CP1E CPU Unit Instructions Reference Manual(W483)
Function
SWAP(637) switches the position of the two
bytes in all of the words in the range of mem-
ory from R1 to R1+N-1.
Hint
• This instruction can be used to reverse the order of ASCII-code characters in each word.
Sample program
When CIO 0.00 is ON in the following example, SWAP(637) switches the data in the leftmost bytes with
the data in the rightmost bytes in each word in the 10-word range from W0 to W9.
N
R1
Byte position is swapped.
SWAP
&10
W0
078
15
4 1 4 2
4 3 4 4
4 5 4 6
3 0 3 1
078
15
4 2 4 1
4 4 4 3
4 6 4 5
3 1 3 0
W0
W1
W2
to
W9
W0
W1
W2
to
W9
N
R1
to to
0.00

Table of Contents

Other manuals for Omron SYSMAC CP Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron SYSMAC CP Series and is the answer not in the manual?

Omron SYSMAC CP Series Specifications

General IconGeneral
BrandOmron
ModelSYSMAC CP Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals