Mitsubishi Electric FX3G SERIES Programming Manual page 538

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
3)
When "n" is an odd number, only the low-order byte (8 bits) of the final separation source device is regarded as
the target data as shown in the figure below.
For example, when "n" is "5", the data from
D
+4.
b15
+0
S
+1
+2
4) When "n" is "0", WTOB instruction is not executed.
Related instruction
Instruction
BTOW (FNC142)
Caution
Devices storing the separation source data can overlap devices storing the separated data.
When "n" is an odd number, however, the high-order byte (8 bits) of the final separation source device is overwritten
and erased.
b15
=D12
S
D13
D14
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 separation source devices
K6706)
When "n" is an odd number, the number of a rounded up value decides the number of devices. (error code: K6706)
• When the separated data destination devices
code: K6706)
Program example
In the program shown below, the data stored in D10 to D12 is separated in byte units, and stored in D20 to D25.
X000
b15
D10
D11
D12
536
b8 b7
b0
12H
39H
56H
78H
FEH
DCH
It is ignored when
"n" is "5".
Combines the low-order 8 bits (low-order byte) of consecutive 16-bit data.
b8 b7
b0
32H
31H
34H
33H
36H
35H
"36H" is ignored when "n" is "5".
Because D14 is also used in the
separation result destination devices D
and later, "36H" is erased and
overwritten.
S
FNC141
D10
D20
WTOBP
b8 b7
b0
FDH
58H
57H
E2H
34H
44H
S
to the low-order byte (8 bits) of
b15
+0
00H
D
+1
00H
+2
00H
+3
00H
+4
00H
"00H" is stored.
Description
b15
=D12
D
D13
D14
D15
D16
"00H" is stored.
to
S
+n/2 are outside the specified device range (error code:
D
to
D
+n-1 are outside the specified device range (error
K6
END
b15
D20
00H
D21
00H
D22
00H
D23
00H
D24
00H
D25
00H
"00H" is stored.
19 Data Operation 2 – FNC140 to FNC149
19.2 FNC141 – WTOB / WORD to BYTE
S
+2 is stored in
b8 b7
b0
39H
12H
78H
56H
DCH
b8 b7
b0
00H
31H
00H
32H
00H
33H
00H
34H
00H
35H
b8 b7
b0
58H
FDH
E2H
6 bytes
57H
44H
34H
D
to
When "n"
is "5"
When "n"
is "5"

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents