7.5 Data Processing Instructions
7.5.9 Separation and connection of data in units of bytes
7-83
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
WT
OB,
BT
OW
WTOB, BTOW
BTOW(P)
(1) Connects the lower 8 bits of the 16-bit data in n words stored in the device specified for
and the following devices in units of 1-word and stores it to the device specified for
and
the following devices. The upper 8 bits of n-word data stored in the device specified for
and the following devices will be ignored. Further, if n is an odd number, 0 is stored to the
upper 8 bits of the device where the nth byte data are stored.
For example, if n 5, the lower 8-bit data from
to (
+4) are connected and stored to
to (
+2).
(2) Setting the number of bytes with n automatically determines the range of the byte data
specified for
and the range of the devices to store the connected data specified for
.
(3) No processing will be performed when the number of bytes specified for n is 0.
(4) The upper 8 bits of the byte data storage device specified for
are ignored, and the lower 8
bits are used.
(5) Connection is correctly processed even when the device range (
to
+(n-1)) where the
data to be connected is stored overlaps with the device range (
to
+(
-1)) where the
connected data will be stored.
For example, the following will take place in a case where the lower 8 bits of D11 to D16 are
to be stored to D12 to D14.
O
peration Error
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The range of the number of bytes specified for n following the device number
specified for
exceeds the corresponding device range.
(Error code: 4101)
• The range of the number of bytes specified for n following the device number
specified for
exceeds the corresponding device range.
(Error code: 4101)
s
d
s
b15
b8b7
b0
b15
b8 b7
b0
s
s
s
Data
of
the
1
st
by
te
n
by
tes
Data
of
the
(
n
-1) by
te
Upper
by
tes
are
i
gnore
d.
s
s
d
d
n
2
+( -1)
d
*1: Fi
gures
after
the
d
ec
i
ma
l
po
i
nt
are
roun
d
e
d
up
.
*1
+1
+2
+3
+(
n
-1)
Data
of
the
2
n
d by
te
Data
of
the
3
r
d by
te
Data
of
the
4
th
by
te
Data
of
the
nth
by
te
Data
of
the
1
st
by
te
Data
of
the
3
r
d by
te
Data
of
the
2
n
d by
te
Data
of
the
4
th
by
te
Data
of
the
nth
by
te
s
s
d
d
I
f
n
= 5
b15
b8b7
b0
b15
b8 b7
b0
s
s
s
s
d
d
12
H
34
H
56
H
78
H
12
H
34
H
56
H
78
H
00
H
00
H
00
H
00
H
FE
H
00
H
FE
H
00
H
00
H
i
s
set
.
s
d
+1
+1
+2
+2
+3
+4
s
d
s
s
s
d
d
n
2
D12
31
H
00
H
31
H
32
H
33
H
34
H
D11
D13
D12
D14
31
H
32
H
33
H
34
H
36
H
D13
D16
00
H
00
H
00
H
00
H
00
H
35
H
00
H
D15
D11
35
H
36
H
35
H
00
H
36
H
00
H
D14
D15
D16
b15
b8 b7
b0
b15
b8 b7
b0
s
d
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......