Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
535
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
19 Data Operation 2 – FNC140 to FNC149
19.3 FNC142 – BTOW / BYTE to WORD
11
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High Speed
Processing
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
Related instruction
Caution
Devices storing the combination source data may be equivalent to devices storing the combined data.
After combination, however, the high-order byte (8 bits) of the combination source data stored in the devices used for
the combination destination data is erased and overwritten with the data acquired by combining the high-order byte (8
bits).
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the combination source devices to +n-1 are outside the specified device range (error code:
K6706)
When the combined data destination devices to +n/2 are outside the specified device range (error
code: K6706)
When "n" is an odd number, the number of a rounded up value decides the numer of devices. (error code: K6706)
Program example
In the program shown below, the low-order byte (8 bits) data stored in D20 to D25 is combined, and stored in D10 to
D12.
Instruction Description
WTOB (FNC141) Separates consecutive 16-bit data in byte units (8 bits).
EFH BCH
ABH
CDH
ABH
12H
34H
78H
EFH
56H
CDH
9AH
BCH
S
=D11
D12
The high-order bytes is ignored.
When
"n" is
"6"
D
=D10 34H
78H
12H
56H
9AH
It is not changed.
D13
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
Because these combination source devices are
also used for the combination destination, "ABH"
and "CDH" are erased and overwritten.
S
S
D
D
31H
D20
D21
The high-order bytes is ignored.
D22
6 bytes
D10
D11
D12
12H
55H
78H
49H
67H
00H
31H
44H
78H
12H
55H
36H 49H
48H
67H
D23
D24
49H
31HD25
b15 b8 b7 b0 b15 b8 b7 b0
X000
FNC142
BTOWP
D20 D10 K6
END