Keyence Visual KV Series Manual do Utilizador Página 179

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 392
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 178
2.4 Instruction Details
1
2
3-155
Chapter 2 Instructions
MUL (Multiplication)
Coding
Description
The MUL instruction multiplies the contents of the internal register by the oper-
and value and inputs the result back to the internal register.
In the above example, the contents of DM0000 are multiplied by "#00100" and
the result is stored in DM0001.
When the contents of DM0000 is "#00200", for example, "#20000" is stored in
DM0001.
DM0000 (#00200) x #00100DM0001 (#20000)
Note 1: An overflow occurs when the operation result exceeds 16 bits (#65535). In
such a case, only the data of the low-order 16 bits are stored in the internal register,
and the overflow data of the high-order 16 bits is stored in TM00. (The data of the
high-order 16 bits is always stored in TM00.)
Note 2: When an overflow occurs, special utility relay 2009 turns ON.
Tips
Solution when operation result overflows 16 bits
DM0000 x DM0001 = DM0003 (High-order 16 bits) – DM0002 (Low-order 16 bits)
The operation result must be 32 bits or less.
Arithmetic flag
2009 Turns ON when the result of a MUL operation exceeds 16 bits. Turns OFF at
other times.
2010 Turns ON when all 32 bits are "0" after a MUL operation. Turns OFF at other
times.
2011 No change
2012 The DM or relay indirectly addressed with #TM is out of range.
"Indirect addressing" (p. 3-127)
DM0000
LDA
#00100
MUL
DM0001
STA
2002
Line No. Instruction Operand
0000 LD 2002
0001 LDA DM0000
0002 CON
0003 MUL #00100
0004 CON
0005 STA DM0001
F
(TM00)
FFF
0002
FFFF0001
(Internal register)
Internal register
Operand
Hexadecimal number
2002 DM0000
LDA
DM0001
MUL
DM0002
STA
TM00
LDA
DM0003
STA
MUL / @MUL
KVNKA Chap 02_4cP.p65 08.3.11, 0:02 PM155
Vista de página 178
1 2 ... 174 175 176 177 178 179 180 181 182 183 184 ... 391 392

Comentários a estes Manuais

Sem comentários