FX Series Programmable Controlers Applied Instructions 5
5-21
5.2.4 SMOV (FNC 13)
Operation 1:
This instruction copies a specified number of digits
from a 4 digit decimal source (S) and places them at
a specified location within a destination (D) number
(alsoa4digitdecimal).Theexistingdatainthe
destination is overwritten.
Key:
m
1 - The source position of the 1st digit to be moved
m
2 - The number of source digits to be moved
n- The destination position for the first digit
Note: The selected destination must NOT be smaller than the quantity of source data.
Digit positions are referenced by number: 1= units, 2= tens, 3= hundreds, 4=thousands.
Operation 2: (Applicable units, FX
2N and FX2NC). This modification of the SMOV operation
allows BCD numbers to be manipulated in exactly the same way as the ‘normal’ SMOV
manipulates decimal numbers, i.e. This instruction copies a specified number of digits from a 4
digit BCD source (S) and places them at a specified location within a destination (D) number
(also a 4 digit BCD number).
To select the BCD mode the SMOV instruction is
coupled with special M coil M8168 which is driven
ON. Please remember that this is a ‘mode’ setting
operation and will be active, i.e. all SMOV
instructions will operate in BCD format until the
mode is reset, i.e. M8168 is forced OFF.
Mnemonic Function
Operands
Program steps
m
1 m2 nS D
SMOV
FNC 13
(Shift move)
Takeselementsof
an existing 4 digit
decimal number
and inserts them
into a new 4 digit
number
K, H
Note: available
range 1 to 4.
)
K, H,
KnX, KnY,
KnM, KnS,
T,C,D,V,Z
K, H,
KnY, KnM,
KnS,
T,C,D,V,Z
SMOV,
SMOVP:
11 steps
Range0to9,999(deci-
mal)or0to9,999(BCD)
when M8168 is used -
see note opposite
FX
1S
FX
1N
FX
2N
FX
2NC
PULSE-P
16 BIT OPERATION
32 BIT OPERATION
X0
SMOV D 1 K 4
[ S ] [ D ]
K 2 D 2 K 3
nm1 m2
FX
1S
FX
1N
FX
2N
FX
2NC
X0
M8168
SMOV D 1 K 4
[ S ] [ D ]
K 2 D 2 K 3
nm1 m2
M8000
M8168
General note:
For more information about ‘decimal’ and ‘Binary Coded Decimal’ (BCD) numbers please
see the section titled ‘Interpreting Word Data’ on page 4-42 for more details.