Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
8 Applied Instructions (Move and Compare)
8.4 SMOV / Shift Move
144
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation(SMOV, SMOVP)
The contents of the transfer source specified by and transfer destination specified by are converted
into 4-digit BCD (0000 to 9999) respectively. "m2" digits starting from "m1"th digit are transferred (composed)
to the transfer destination specified by starting from "n"th digit, converted into binary, and then stored to
the transfer destination specified by .
While the command input is OFF, the transfer destination specified by does not change.
When the command input turns ON, the data of the transfer source specified by and unspecified
digits in the transfer destination specified by 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.
Cautions
1) Some restrictions to applicable devices
S1:The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2:The FX
3U and FX3UC PLCs only are applicable.
SMOV
EN
s
m1
ENO
d
m2
n
Command input
Digit transfer
data
Result data
Head digit position
Number of digits
Digit position at
transfer destination
In the case of = 4, = 2, = 3
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)
Command contact=ON
m1 m2 n
s
s
d
d
X010
X010
M8168 is available for other instructions also.
After using M8168 for SMOV instruction, return it to OFF.
M8168
M8168
SMOV
EN
s
m1
ENO
d
m2
n
D1 D2
K4
K2
K3