Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-19
Operation 2:
(Applicable units are FX units with CPU’s ver 3.07 or
g
reater and FX
2C
‘s). This
modification of the SMOV operation allows BCD numbers to be manipulated in exactl
y
the
same wa
y
as the ‘normal’ SMOV manipulates decimal numbers, i.e. This instruction copies a
specified number of di
g
its from a 4 di
g
it BCD source (S) and places them at a specified
location within a destination (D) number (also a 4 di
g
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
g
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
y
of each data bit within the source device (S) is
inverted and then moved to a desi
g
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
g
it which is ‘0’ will become a ‘1’. If the destination area is smaller than the
source data then onl
y
the directl
y
mappin
g
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
y
Coded Decimal’ (BCD) numbers please
see the section titled ‘Interpretin
g
Word Data’ on pa
g
e 4-42 for more details.
X0
CML D 0 K1Y0
[ S ] [ D ]