Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
19 Applied Instructions (Data Operation 2)
19.3 BTOW / BYTE to WORD
504
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
2) Higher byte (8 bits) of 16-bit data (after ) in the coupling source is ignored.
3) When n is an odd number, as shown below, higher byte (8 bits) of the data coupled in the last place is set
to 00H. For example, in the case of n=5, data of lower byte (8 bits) of to +4 is stored in
to +2. Higher byte (8 bits) of +2 is 00H.
4) Instruction is not processed in the case of n=0.
Related instructions
Cautions
1) The device storing the coupling source data and the device storing the coupled data can be used in
overlap. However, it must be noted that the higher byte (8 bits) of the coupling source data stored in the
device used in overlap is erased because the data of the higher byte (8 bits) is overwritten by the coupled
data.
2) The instruction is provided in the FX
3UC PLC Ver. 2.20 or later.
Error
In the following case, it is an operation error, error flag M8067 is turned ON, and error code is stored in
D8067.
1) When the devices to ( +n-1) at the coupling source exceeds the device range of the specified
devices. (Error code: K6706)
2) When the devices to ( +n/2) for storing the coupled data exceeds the device range of the
specified devices. When n is an odd number, the devices are required in the number by rounding up.
(Error code: K6706)
Instruction Content
WTOB This instruction separates continuous 16-bit data in byte (8-bit) unit.
00H
b15 b8 b7 b0
+0
+1
Higher bytes are ignored.
+2
In the case
of n=5
+0
+1
+2
34H
78H
12H
56H
9AH
ABH
CDH
ABH
12H
34H
78H
EFH 56H
CDH
9AH
+3
+4
In the case of n=5, "H00" is set.
b15 b8 b7 b0
s d
EFH BCH
ABH
CDH
ABH
12H
34H
78H
EFH
56H
CDH
9AH
BCH
=D11
D12
Higher bytes are ignored.
In the case
of n=6
Not changed.
Since devices are overlapped, "ABH" and "CDH"
are overwritten and erased.
=D10 34H
78H
12H
56H
9AHD13
D14
D15
CDH
EFH
ABH
56H
78H
9AH
D11
D12
D13
D14
D15
EFH BCH
D16
b15 b8 b7 b0 b15 b8 b7 b0
D16
s
d