7-87
WTOB(P),BTOW(P)
1
2
3
4
6
6
7
8
7.5 Data processing instructions
7.5.9 Data dissociation and linking in byte units (WTOB(P),BTOW(P))
(4) The upper 8 bits of the byte storage device designated by are ignored, and the lower 8
bits are used.
(5) Linking is correctly processed even when the device range ( to +(n-1)) where the data
to be linked is stored overlaps with the device range ( to +( -1)) where the linked 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 at D12 to D14:
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.
• The range of the number of bytes designated by n following the device number
designated by exceeds the relevant device range. (Error code: 4101)
• The range of the number of bytes designated by n following the device number
designated by exceeds the relevant device range. (Error code: 4101)
Program Example
(1) The following program dissociates the data at D10 to D12 in byte units and stores it at D20
to D25 when X0 is turned ON.
[Ladder Mode] [List Mode]
[Operation]
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
Step
Instruction
Device
58
H
FD
H
E2
H
57
H
44
H
34
H
D11
D12
58
H
00
H
FD
H
00
H
E2
H
00
H
57
H
00
H
34
H
00
H
44
H
00
H
D21
D22
D23
D25
D10
D24
D20
6 bytes
b8 b0
b8 b0b15
b7
b7b15