Bcd 4-Digit Multiplication And Division Operations - Mitsubishi MELSEC-Q/L Programming Manual

Table of Contents

Advertisement

B*, B*P, B/, B/P
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
code
4100
The
,
or
BCD data is outside the 0 to 99999999 range.
S1
S2
D
Program Example
(1) The following program adds the BCD data at D3 and D4 to the BCD data at Z1 and Z2 when X20 goes ON, and stores
the result at R10 and R11.
[Ladder Mode]
6.2.7
B*, B*P, B/, B/P

BCD 4-digit multiplication and division operations

6.2.7
B*, B*P, B/, B/P
B*
, B/
*
B
P, B/P
: Data to be multiplied/divided or head number of the devices where the data to be multiplied/divided is stored (BCD 4 digits)
S1
: Data for multiplying/dividing or head number of the devices where the data for multiplying/dividing is stored (BCD 4 digits)
S2
: Head number of the devices where the multiplication/division operation result will be stored (BCD 8 digits)
D
Internal Devices
Setting
Data
Bit
Word
S1
S2
D
Function
B*
(1) Multiplies BCD data designated by
.
D
5
(2) 0 to 9999 (BCD 4 digits) can be assigned to
204
Error details
[List Mode]
Step
Command
Command
J
\
R, ZR
Bit
and BCD data designated by
S1
S1
S2
6
7
8
0
8
7
and
S1
S2
Q00J/
Q00/
QnH
Q01
Device
Instruction
High
Basic
performance
indicates an instruction symbol of
S1
P
S1
U
\G
Word
, and stores the result in the device designated by
S2
D
+1
(Upper 4 digits)
(Lower 4 digits)
6
0
4
9
7
3
.
QnPH QnPRH
QnU
LCPU
Process
LCPU
Redundant Universal
B ,B/
*
.
S2
D
D
S2
Constants
Zn
Other
K, H
––
––
––
––
D
9
2
8

Advertisement

Table of Contents
loading

Table of Contents