Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 1119

Table of Contents

Advertisement

Flags
Name
Error Flag
Function
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.
XCHG$(665) 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
In this example, XCHG$(665) is used to exchange two text strings.
Ex1
Ex2
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Label
ER
• 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 communications port number specified as the
Com Port number for Background Execution is OFF when background processing is specified.
• OFF in all other cases.
Text strings ABCDE and FG
D100
Ex1: D100
D200
Ex2: D200
3. Instructions
Operation
Ex1
Ex1
Ex2
Ex2
Text strings: FG and ABCDE
Ex1: D100
Ex2: D200
3
Previous data
remains.
1083

Advertisement

Table of Contents
loading

Table of Contents