![Omron CJ1G-CPUxx Instructions Manual Download Page 667](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491667.webp)
646
Table Data Processing Instructions
Section 3-17
Description
SWAP(637) switches the position of the two bytes in all of the words in the
range of memory from R1 to R1+N–1. This instruction can be used to reverse
the order of ASCII-code characters in each word.
Flags
Examples
When CIO 000000 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 W000 to W009.
3-17-10 FIND MAXIMUM: MAX(182)
Purpose
Finds the maximum value in the range.
In CS1-H, CJ1-H, and CJ1M CPU Units, this instruction can be run in the
background. Refer to CS/CJ Series Programmable Controllers Programming
Manual for details on background execution.
Ladder Symbol
Index Registers
---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area
N
R1
Byte position is swapped.
N
R1
Name
Label
Operation
Error Flag
ER
ON if the N is 0000.
OFF in all other cases.
to
to
to
to
&10
N
R1
C: First control word
R1: First word in range
D: Destination word
MAX(182)
C
R1
D
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...