Omron CJ - INSTRUCTIONS Reference Manual page 1140

Table of Contents

Advertisement

3. Instructions
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
1102
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
Operation
Ex1
Ex2
Text strings: FG and ABCDE
Ex1: D100
Ex2: D200
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Ex1
Ex2
Previous data
remains.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents