Double Signed Binary Divide - Dbsl - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Binary Calculation Instructions
Description
Flags
Example
00000
5-22-10 DOUBLE SIGNED BINARY DIVIDE – DBSL(––)
Limitations
DBS(––) divides the signed binary content of Dd by the signed binary content
of Dr, and outputs the 8-digit signed binary result to R+1 and R. The quotient
is placed in R, and the remainder is placed in R+1.
Note Refer to 1-7 Calculating with Signed Binary Data for more details.
ER:
Dr contains 0.
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
EQ:
ON when the content of R (the quotient) is 0000, otherwise OFF.
In the following example, DBS(––) is used to divide the signed binary contents
of DM 0010 with the signed binary contents of DM 0020 and output the result
to LR 21 and LR 02.
R+1: LR 02
F
Remainder (−6)
Ladder Symbols
DBSL(−−)
Dd
Dr
R
Dd and Dd+1 must be in the same data area, as must Dr and Dr+1.
R and R+3 must be in the same data area.
DM 6143 to DM 6655 cannot be used for R.
Quotient
R
Dr
Dd
Address Instruction
DBS(−−)
00000
DM 0010
00001
DM 0020
LR 01
Dd: DM 0010
D
D
D
÷
Dr: DM 0020
0
0
1
R: LR 01
F
F
A
F
E
B
Quotient (−336)
@DBSL(−−)
Dd
Dr
R
Section 5-22
Remainder
R + 1
Operands
LD
DBS(−−)
DM
DM
LR
A
(−8,742)
A
(26)
0
(−336 and −6/26)
Operand Data Areas
Dd: First dividend word (binary)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Dr: First divisor word (binary)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
R: First result word
IR, SR, AR, DM, EM, HR, LR
00000
0010
0020
21
337

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents