Mitsubishi Electronics QSERIES Smoker User Manual


  Open as PDF
of 1204
 
6-43
B*(P),B/(P)
1
2
3
4
4
6
7
8
6.2 Arithmetic Operation Instructions
6.2.7 BCD 4-digit multiplication and division operations (B*(P),B/(P))
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
The or BCD data is outside the 0 to 9999 range. (Error code: 4100)
Attempt to divide by 0. (Error code: 4100)
Program Example
(1) The following program multiplies, when X20 is turned ON, the BCD data at X0 to XF by the
BCD data at D8 and stores the operation result at D0 to D1.
[Ladder Mode] [List Mode]
[Operation]
(2) The following program divides 5678 by the BCD data 1234, stores the result at D502 and
D503, and at the same time outputs the quotient to Y30 to Y3F.
[Ladder Mode] [List Mode]
[Operation]
S1
S2
S2
Step
Instruction
Device
Multiplication result
482868427953
D8 D1 (Upper 4 digits)
X0XF
4526
D0 (Lower 4 digits)
Multiplier
Multiplicand
Step
Instruction
Device
/
000
4
21
3
4
6578
D502
70
42
D503
0004
Y30Y3F
Quotient
Remainder
Quotient