Mitsubishi Electronics FX3G Video Gaming Accessories User Manual


 
249
FX3G/FX3U/FX3UC 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
Introduction
2
Overview
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
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 digit2nd digit3rd 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
81 81
81
657
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