Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 615

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
SWAP
Instruction
SWAP BYTES
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
N
Number of words
R1
First word in range
N: Number of words
N specifies the number of words in the range and must be 0001 to FFFF hexadecimal (or &1 to
&65,535).
R1: First word in range
Leftmost byte Rightmost byte
15
R1
to
to
R1+(N–1)
Note R1 and R1+(N-1) must be in the same data area.
Operand Specifications
Word addresses
Area
CIO
WR
HR
N
OK
OK
OK
R1
Flags
Name
Error Flag
578
Mnemonic
Variations
SWAP
@SWAP
Block program areas
Step program areas
OK
OK
Description
8 7
0
to
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
• ON if the N is 0.
• ON if the Communications Port Enabled Flag for the communications port number specified as the
Com Port number for Background Execution is OFF when background processing is specified.
• OFF in all other cases.
Function
code
Switches the leftmost and rightmost bytes in all of
637
the words in the range.
SWAP
SWAP(637)
N
N: Number of words
R1
R1: First word in range
Subroutines
OK
Data type
UINT
UINT
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
---
---
Operation
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
1
Variable
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents