7-82
7.5 Data Processing Instructions
7.5.9 Separation and connection of data in units of bytes
WTOB, BTOW
Function
WTOB(P)
(1) Separates n bytes of the 16-bit data stored in the device specified for
and the following
devices, and stores them to the device specified for
and the following devices.
For example, if n 5, data through the lower 8 bits of
to (
+2) would be stored to
to
(
+4).
(2) Setting the number of bytes with n automatically determines the range of the 16-bit data
specified for
and the range of the devices to store the byte data specified for
.
(3) No processing will be performed when the number of bytes specified for n is 0.
(4) The 00
H
code will automatically be stored to the upper 8 bits of the byte storage device
specified for
.
s
d
Upper
by
te
L
o
w
er
by
te
Upper
by
te
L
o
w
er
by
te
Upper
by
te
L
o
w
er
by
te
Data
of
l
o
w
er
by
te
00
H
Data
of
upper
by
te
Data
of
l
o
w
er
by
te
Data
of
upper
by
te
Data
of
l
o
w
er
by
te
Data
of
upper
by
te
b15
b8b7
b0
b15
b8 b7
b0
d
s
s
d
d
d
d
d
s
n
by
tes
*1: F
ract
i
ons
that
fo
ll
o
w
the
d
ec
i
ma
l
po
i
nt
are
roun
d
e
d
up
.
n
2
+( -1)
*1
+1
00
H
00
H
00
H
00
H
00
H
+3
+2
+1
+(
n
-2)
+(
n
-1)
s
s
d
d
b15
b8b7
b0
b15
b8 b7
b0
d
s
s
d
d
d
39
H
78
H
56
H
39
H
00
H
12
H
00
H
78
H
00
H
56
H
00
H
D
C
H
00
H
D
C
H
FE
H
W
hen
n
=5
by
tes
I
gnore
d w
hen
n
=5
d
s
12
H
+1
+2
+1
+2
+3
+4
s
d
d
31
H
32
H
33
H
3
4
H
35
H
36
H
D
13
D
1
4
31
H
00
H
32
H
00
H
33
H
00
H
3
4
H
00
H
36
H
00
H
35
H
00
H
D
12
D
13
D
1
4
D
16
D
12
D
15
D
11
b8
b0
S
tores
00
H.
b8
b0
b15
b7
b15
b7
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: ......