Double Bcd Divide - Divl(57) - Omron C200HX Operation Manual

Hide thumbs Also See for C200HX:
Table of Contents

Advertisement

BCD Calculations
Flags
Example
00000
Dd: HR 09
0
0
0
5-19-12 DOUBLE BCD DIVIDE – DIVL(57)
Limitations
Description
Flags
ER:
Dd or Dr is not in BCD or when Dr is #0000.
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 020 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
0
Dd: IR 020
3
3
4
5
2
Ladder Symbols
DIVL(57)
Dd
Dr
R
Dd and Dd+1 must be in the same data area, as must Dr and Dr+1.
R through R+3 must be in the same data area.
When the execution condition is OFF, DIVL(57) is not executed. When the
execution condition is ON, DIVL(57) the eight-digit content of Dd and D+1 is di-
vided by the content of Dr and Dr+1 and the result is placed in R to R+3: the quo-
tient in R and R+1, the remainder in R+2 and R+3.
R+3
Dr+1
ER:
Dr and Dr+1 contain 0.
Dd, Dd+1, Dr, or Dr+1 is not 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.
Address Instruction
DIV(33)
00000
020
00001
HR 09
DM 0017
Remainder
R + 1: DM 0018
0
0
2
@DIVL(57)
Dd
Dr
R
Remainder
R+2
Dr
Section 5-19
Operands
LD
DIV(33)
HR
DM
Operand Data Areas
Dd: First dividend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Dr: First divisor word (BCD)
IR, SR, AR, DM, HR, TC, LR
R: First result word
IR, SR, AR, DM, HR, LR
Quotient
R+1
R
Dd+1
Dd
00000
020
09
0017
237

Advertisement

Table of Contents
loading

This manual is also suitable for:

C200hgC200he

Table of Contents