
Chapter 5. Application instructions
5-63
-
Execution conditions
2) Program example
-
Program which stores the division result of D0001 and D0002 at D0010, D0011 while P020 is on.
-
Program which stores the division result of D0001, D0002 and D0003,D0004 at D0010 ~ D0013
when P020 is switched on.
Input condition
DIVB, DDIVB
DIVBP, DDIVBP
Executed only once
Executed only once
Executed per scan
Executed per scan
DIVB D0001 D0002 D0010
P020
h7806
h0078
h0006
D0001
h0100
=
÷
D0002
D0011
D0010
DDIVBP D0001 D0003 D0010
h3904
h5678
h0001
D0001
h0765
=
÷
D0002
D0003
D0004
h0000
h1023
D0013
D0012
h0000
h3627
D0011
D0010
P020
Remainder
Quotient
Remainder
Quotient