![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436223.webp)
213
Description
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.
R+1
R
Dd
Dr
Quotient
Remainder
Flags
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.
Example
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.
DIV(33)
020
HR 09
DM 0017
00000
R: DM 0017
R + 1: DM 0018
1
1
5
0
0
0
0
2
Dd: IR 020
3
4
5
2
Quotient
Remainder
Dd: HR 09
0
0
0
3
Address
Instruction
Operands
00000
LD
00000
00001
DIV(33)
020
HR
09
DM
0017
5-19-12 DOUBLE BCD DIVIDE – DIVL(57)
Dd: First dividend word (BCD)
IR, SR, AR, DM, HR, TC, LR
Dr: First divisor word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, HR, LR
DIVL(57)
Dd
Dr
R
@DIVL(57)
Dd
Dr
R
Limitations
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.
BCD Calculations
Section 5-19
Содержание 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...