Signed Binary Divide - Dbs - Omron SYSMAC C200HS Operation Manual

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Binary Calculations
Example
00000
R+3: LR 24
F
F
F
F
5-20-9 SIGNED BINARY DIVIDE – DBS(––)
Limitations
Description
Flags
In the following example, MBSL(––) is used to multiply the signed binary con-
tents of IR 101 and IR 100 with the signed binary contents of DM 0021 and
DM 0020 and output the result to LR 24 through LR 21.
Md+1: IR 101
0
0
Mr+1: DM 0021
X
F
F
R+2: LR 23
R+1: LR 22
F
F
7
D
F
C
Ladder Symbols
DBS(––)
Dd
Dr
R
R and R+1 must be in the same data area.
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. Refer to page 29 for details on
signed binary data.
ER:
Dr contains 0.
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 content of R (the quotient) is 0000, otherwise OFF.
Address Instruction
MBSL(––)
00000
100
00001
DM 0020
LR 21
Md: IR 100
0
8
7
9
3
8
Mr: DM 0020
F
0
A
8
1
2
R: LR 21
A
5
4
5
F
0
@DBS(––)
Dd
Dr
R
Quotient
R
Dr
Dd
Section 5-20
Operands
LD
MBSL(––)
DM
LR
(555,320)
(–1,005,550)
(–558,402,026,000)
Operand Data Areas
Dd: Dividend word
IR, SR, AR, DM, HR, TC, LR, #
Dr: Divisor word
IR, SR, AR, DM, HR, TC, LR, #
R: First result word
IR, SR, AR, DM, HR LR
Remainder
R + 1
00000
100
0020
21
231

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents