272
BXCH, BXCHP
Function
(1) Exchanges 16-bit data of n points from device designated by and 16-bit data of n points from device designated by
.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Program Example
(1) The following program exchanges 16-bit data for 3 points from D200 for 16-bit data for 3 points from R0 when X1C goes
ON.
[Ladder Mode] [List Mode]
[Operation]
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The points specified in n exceed those of the corresponding device
specified in or .
The and devices overlap.
D1
D2
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
n
0 0 0 0 1 1 1 1
1 1
1
1
0
0
0
0
+1
+
(
n 1
)
+2
+
(
n 2
)
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
b7
b0
b15
b8
0 0 1 1 0 0 1 1
1 1
0
0
1
1
0
0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 0 0 0 1 1 1 1
1 1
1
1
0
0
0
0
1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 1 1 0 0 1 1
1 1
0
0
1
1
0
0
D1
D2
D1
D1
D1
D1
+1
+
(
n 1
)
+2
+
(
n 2
)
D1
D1
D1
D1
D1
+1
+
(
n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