Mitsubishi Electronics 13JW55 ユーザーズマニュアル

ページ / 350
 
 
5 - 36
 
 
 
Project name 
QB-18 
Program name 
MAIN 
5.4.2  
(P) 
  BIN 16-bit data multiplication 
 / (P)    BIN 16-bit data division 
X0
0
D0
K2000
MOVP
X2
3
1
S2
X3
7
D20
K600
D0
/P
D
S1
2
S2
D10
D0
K30
*P
D
S1
 
 
1
● When the input condition is turned on, the content of the device specified in 
S1
is 
multiplied by the content of the device specified in 
S2
and the result is stored in 
the device specified in 
D
To store the result of 16-bit data × 16-bit data, 
16 bits (1 word) is not enough.
Therefore, D10 which is specified in the 
program and the next number D11 work as 
the holder of the result.
K30
30
S1
D0
2000
S2
=
D11
D10
D
60000
This device is regarded as a 32-bit register to 
hold the result. Left-most bit of D10 (B15) is 
not a bit to determine positive and negative. 
It is regarded as a part of the data.
The instructions must be regarded as 32 bits for programming with the calculation result of the
             instruction. (such as the DMOV instruction and the DBCD instruction)
*(P)