227
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
9 Move and Compare – FNC 10 to FNC 19
9.4 FNC 13 – SMOV / Shift Move
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
Explanation of function and operation
1. 16-bit operation (SMOV and SMOVP)
The contents of the transfer source
and transfer destination
are converted into 4-digit BCD
(0000 to 9999) respectively. "m2" digits starting from "m1"th digit are transferred (composed) to the transfer
destination
starting from "n"th digit, converted into binary, and then stored to the transfer destination
.
• While the command input is OFF, the transfer destination
does not change.
• When the command input turns ON, only the specified digits in the transfer destination
are changed.
The transfer source
and unspecified digits in the transfer destination
do not change.
[1]
is converted from binary into BCD.
[2] "m2" digits starting from "m1"th digit are
transferred (composed) to
’ starting
from "n"th digit.
The digits of 10
3
and 10
0
of
’ are not
affected even if data is transferred from
’.
[3] The composed data (BCD) is converted
into binary, and stored to
.
2. Extension function
When M8168 is set to ON first and then SMOV instruction is executed, conversion from binary to BCD is not
executed.
Data is moved in units of 4 bits.
Program example
The data on three-digit digital switches are composed, and stored as binary data to D2.
S
D
D
D
D
D
S
D
FNC 13
SMOV
m1
m2
n
S
D
Command
input
4th digit
1st digit
2nd digit
3rd digit
10
0
10
1
10
2
10
3
10
0
10
1
10
2
10
3
Do not change.
(16-bit binary data)
Data is automatically
converted. [1]
' (4-digit BCD data)
Digits are moved. [2]
' (4-digit BCD data)
Data is automatically
converted. [3]
(16-bit binary data)
In the case of "m1 = 4,
m2 = 2, n = 3".
Command contact = ON
S
D
S
D
↓
↓
↓
S
D
D
S
D
X010
M8168
M8168
X010
FNC 13
SMOV
D 1
K 4
K 2
D 2
K 3
M8168 is available for other instructions also.
After using M8168 for SMOV instruction, return it to OFF.
FNC 13
SMOV
D 1
K 1
K 1
D 2
K 3
FNC 19
BIN
K2X020
D 2
FNC 19
BIN
K1X000
D 1
(X020 to X027) 2-digit BCD
→
D2 (binary)
(X000 to X003) 1-digit BCD
→
D1 (binary)
Data on three digital switches
connected to non-consecutive input
terminals are composed.
PLC
X003 to X000
X027 to X020
8
1
8
1
8
1
6
5
7
10
2
10
1
10
0
1-digit BCD data of D1 is transferred to
the 3rd digit (BCD data) of D2, and
automatically converted into binary data.
M8000
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......