FX Series Programmable Controlers Applied Instructions 5
5-19
Operation 2:
(Applicable units are FX units with CPU’s ver 3.07 or
reater and FX
2C
‘s). This
modification of the SMOV operation allows BCD numbers to be manipulated in exactl
the
same wa
as the ‘normal’ SMOV manipulates decimal numbers, i.e. This instruction copies a
specified number of di
its from a 4 di
it BCD source (S) and places them at a specified
location within a destination (D) number (also a 4 di
it 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’ settin
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.
5.2.5 CML (FNC 14)
Operation:
A cop
of each data bit within the source device (S) is
inverted and then moved to a desi
nated destination
(D).
This means each occurrence of a ‘1’ in the source data will become a ‘0’ in the destination data
while each source di
it which is ‘0’ will become a ‘1’. If the destination area is smaller than the
source data then onl
the directl
mappin
bit devices will be processed.
Mnemonic Function
Operands
Program steps
SD
CML
FNC 14
(Compli-
ment)
Copies and
inverts the source
bit pattern to a
specified
destination
K, H,
KnX, KnY, KnM, KnS,
T, C, D, V, Z
KnY, KnM, KnS,
T, C, D, V, Z
CML,CMLP:
5 steps
DCML,
DCMLP:
9 steps
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 ‘Binar
Coded Decimal’ (BCD) numbers please
see the section titled ‘Interpretin
Word Data’ on pa
e 4-42 for more details.
X0
CML D 0 K1Y0
[ S ] [ D ]