![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436242.webp)
232
Example
In the following example, DBS(––) is used to divide the signed binary contents of
IR 001 with the signed binary contents of DM 0020 and output the result to LR 21
and LR 22.
DBS(––)
001
DM 0020
LR 21
Address
Instruction
Operands
00000
LD
00000
00001
DBS(––)
001
DM
0020
LR
21
00000
Dd: IR 001
D
D
D
A
Dr: DM 0020
0
0
1
A
R: LR 21
F
E
B
0
÷
R+1: LR 22
F
F
F
A
(–8,742)
(26)
(–336 and –6)
Remainder (–6)
Quotient (–336)
5-20-10 DOUBLE SIGNED BINARY DIVIDE – DBSL(––)
Dd: Dividend word (binary)
IR, SR, AR, DM, HR, TC, LR, #
Dr: Divisor word (binary)
IR, SR, AR, DM, HR, TC, LR, #
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, HR LR
DBSL(––)
Dd
Dr
R
@DBSL(––)
Dd
Dr
R
Limitations
Dd and Dd+1 must be in the same data area, as must Dr and Dr+1, and R and
R+3.
Description
DBS(––) divides the 32-bit (8-digit) signed binary data in Dd+1 and Dd by the
32-bit signed binary data in Dr+1 and Dr, and outputs the 16-digit signed binary
result to R+3 through R. The quotient is placed in R+1 and R, and the remainder
is placed in R+3 and R+2. Refer to page 29 for details on signed binary data.
R+1
R
Quotient
Remainder
Dd+1
Dd
Dr+1
Dr
R+3
R+2
Flags
ER:
Dr+1 and Dr contain 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+1 and R (the quotient) is 0, otherwise OFF.
Binary Calculations
Section 5-20
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...