6. BASIC INSTRUCTIONS
6
−
28
MELSEC-A
6.2.7 BCD 4-digit multiplication, division
(B*, B*P, B/, B/P)
Available Device
Bit device
Word (16-bit) device
Constant
Pointer
Level
Ca
rr
y
fla
g
Err
o
r
fla
g
X Y M L S B F T C D W R A0
A1
Z V K H P I N
D
igit specification
In
d
e
x
M9012 (M9010, M9011)
(S1)
O O O O O O O O O O O O O O O O O O
(S2)
O O O O O O O O O O O O O O O O O O
K1
to
K4
(D)
O O O O O O O O O O O O O
O
O
Functions B*
(1) Performs the multiplication of BCD data of device specified at (S1) and the BCD
data of device specified at (S2), and stores the result into the device specified at
(D).
(2) At (S1) and (S2), 0 to 9999 (BCD 4 digits) can be specified.
B/
(1) Performs devision of the BCD data specified at (S1) and the BCD data specified
at (S2), and stores the division result into the device specified at (D).
(2) In regards to the operation result, the quotient and remainder are stored by use
of 32 bits.
Quotient (BCD 4 digits):
Stored to the lower 16 bits.
Remainder (BCD 4 digits): Stored to the upper 16 bits.
(3) (D) will not store the remainder of the dividion result if it is a bit device.
Applicable
CPU
All CPUs
K1
to
K8
(S1)
(S2)
(D)+1
(Upper 4 digits)
(D)
(Lower 4 digits)
(S1)
(S2)
(D)(Quotient)
(D)+1(Remainder)
Digit higher than the specified digit is regarded as 0.
Multiplication/division commands
(S1)
(S2)
(D)
(S1)
(S2)
(D)
P
(S1)
Multiplicand/dividend or
head device number stor-
ing multiplicand/dividend
(S2)
Multiplier/divider or head
device number storing
multiplier/divider
(D)
Head device number
which will store the result
Setting data
B
∗
, B/
Indicates the instruction symbol.
Содержание MELSEC-A series
Страница 1: ......
Страница 2: ......
Страница 13: ...A 11 MEMO...
Страница 505: ...APPENDICES APP 100 MELSEC A MEMO...
Страница 507: ......
Страница 508: ......