Справочник Пользователя для Mitsubishi Electronics FX

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-19
Operation 2: (Applicable units are FX units with CPU’s ver 3.07 or greater and FX
2C
‘s). 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.
5.2.5
CML (FNC 14)
Operation:
A copy of each data bit within the source device (S) is
inverted and then moved to a designated destination
(D).
This means each occurrence of a ‘1’ in the source data will become a ‘0’ in the destination data
while each source digit which is ‘0’ will become a ‘1’. If the destination area is smaller than the
source data then only the directly mapping bit devices will be processed.
Mnemonic
Function 
Operands
Program steps
S
D
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
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
X0
M8168
SMOV D 1 K 4
[ S ]
[ D ]
K 2 D 2 K 3
n
m1 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.
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION
X0
CML
D 0
K1Y0
[ S ]
[ D ]