Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1284

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Text String Processing Instructions
Description
Flags
Precautions
Example
Area
Indirect DM/EM
addresses in binary
Indirect DM/EM
addresses in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
XCHG$(665) exchanges the text string designated by Ex1 with the text string
designated by Ex2. If either Ex1 or Ex2 is NUL, then two NUL characters
(0000 hex) will be output to the other one of them.
Ex1
Ex2
Note XCHG$(665) can be processed in the background. Refer to the SYSMAC CS/
CJ/NSJ Series PLC Programming Manual (W394) for details.
Name
Error Flag
ER
The maximum number of characters that can be designated by Ex1 or Ex2 is
4,095 (0FFF hex). If more than that are designated, an error will be generated
and the Error Flag will turn ON.
If the text string data designated by Ex1 and Ex2 overlaps, an error will be
generated and the Error Flag will turn ON.
In this example, XCHG$(665) is used to exchange two text strings.
Ex1
@ D00000 to @ D32767
@ E00000 to @ E32767
@ En_00000 to @ En_32767
(n = 0 to C)
*D00000 to *D32767
*E00000 to *E32767
*En_00000 to *En_32767
(n = 0 to C)
---
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Ex1
Ex2
Label
ON if more than 4,095 characters are designated by Ex1
or Ex2.
ON the Ex1 and Ex2 data overlap.
ON if the Communications Port Enabled Flag for the com-
munications port number specified as the Com Port num-
ber for Background Execution is OFF when background
processing is specified.
OFF in all other cases.
Section 3-33
Ex2
Operation
1245

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents