Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 480

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

BCD Calculation Instructions
Description
Flags
Example
00000
Dd: HR 09
0
0
0
7-21-7 DOUBLE BCD ADD – ADDL(54)
Limitations
462
When the execution condition is OFF, DIV(33) is not executed and the program
moves to the next instruction. When the execution condition is ON, Dd is divided
by Dr and the result is placed in R and R + 1: the quotient in R and the remainder
in R + 1.
ER:
Dd or Dr is not in BCD.
Indirectly addressed DM word is non-existent. (Content of *DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
ON when the result is 0.
When IR 00000 is ON with the following program, the content of IR 216 is divided
by the content of HR 09 and the result is placed in DM 0017 and DM 0018. Exam-
ple data and calculations are shown below the program.
Quotient
R: DM 0017
1
1
5
0
Dd: IR 216
3
4
5
3
Ladder Symbols
ADDL(54)
Au
Ad
R
DM 6144 to DM 6655 cannot be used for R.
Remainder
R+1
Dr
Address Instruction
DIV(33)
216
HR 09
DM 0017
Remainder
R + 1: DM 0018
0
0
0
2
2
@ADDL(54)
Au
Ad
R
Section
Quotient
R
Dd
Operands
00000
LD
00001
DIV(33)
HR
DM
Operand Data Areas
Au: First augend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ad: First addend word (BCD)
IR, SR, AR, DM, HR, TC, LR
R: First result word
IR, SR, AR, DM, HR, LR
7-21
00000
216
09
0017

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents