Omron SYSMAC CS Series Instruction & Reference Manual page 537

Hide thumbs Also See for SYSMAC CS Series:
Table of Contents

Advertisement

Function
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.
Hint
• This instruction can be used to reverse the order of ASCII-code characters in each word.
• SWAP(637) can be processed in the background. Refer to the SYSMAC CS/CJ/NSJ Series PLC
Programming Manual (W394) or the CJ2 CPU Unit Software Operation Manual (W473) for details.
Example Programming
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.
0.00
N
R1
CS/CJ/NSJ Series Instructions Reference Manual (W474)
&10
W0
W0
W1
W2
to
to
W9
Byte position is swapped.
R1
W0
W1
W2
to
to
W9
3. Instructions
N
3
503

Advertisement

Table of Contents
loading

Table of Contents