Mitsubishi Electronics Mitsubishi Digital Electronics Video Gaming Accessories FX3G ユーザーズマニュアル

ページ / 936
535
FX
3G
/FX
3U
/FX
3UC
 Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
19 Data Operation 2 – FNC140 to FNC149
19.3 FNC142 – BTOW / BYTE to WORD
11
FN
C
30
-FN
C
39
R
otati
on and 
Shi
ft
12
FNC4
0-F
NC4
9
D
ata O
per
ati
on
13
FN
C
50-FN
C
59
H
igh S
pe
ed 
P
rocessing
14
FM
C
60-FN
C
69
H
andy 
In
st
ru
ct
ion
15
FNC7
0-F
NC7
9
Ex
ter
nal FX
 I/O
 
D
evice
16
FN
C
80-FN
C
89
Ext
ernal
 FX 
De
vic
e
17
FN
C
100-
FN
C
10
9
Da
ta
 
Transf
er 2
18
FN
C
110-
FN
C
139
Floati
ng Poi
nt
19
FN
C
14
0-F
N
C
149
Da
ta
 
O
per
at
ion 2
20
FN
C
150-
FN
C
159
Posit
ioning 
C
ont
ro
l
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
31H
D25
b15
b8 b7
b0
b15
b8 b7
b0
X000
FNC142
BTOWP
D20
D10
K6
END