EasyManua.ls Logo

Panasonic FP-E - Page 380

Panasonic FP-E
1334 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
High−level Instructions
3 − 116
Explanation of example
Divides the contents of data register DT10 by the contents of data register DT20 when trigger R0 turns on.
The quotient is stored in data register DT30 and the remainder is stored in special data register DT9015
(DT90015 for FP2/FP2SH/FP10SH).
When H (BCD) 15 is in DT10 and H (BCD) 4 is in DT20, as shown below.
Dividiend [S1]: H15 (BCD)
X0: on
Remainder: H3 (BCD)
BCD H code
····Bit position ·····
DT10
15
000
12
0
11
000
8
0
7
000
4
1
3
010
0
1
0015
BCD H code
····
Bit position
·····
DT20
15
000
12
0
11
000
8
0
7
000
4
0
3
010
0
0
0004
BCD H code
····Bit position ·····
15
000
12
0
11
000
8
0
7
000
4
0
3
001
0
1
0003
BCD H code
····
Bit position
·····
DT30
15
000
12
0
11
000
8
0
7
000
4
0
3
001
0
1
0003
Divisor [S2]: H4 (BCD)
Quotient [D]: H3 (BCD)
DT9015/DT90015
Description
The 4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S1 is divided by the
4-digit BCD equivalent constant or the 16-bit area for 4-digit BCD data specified by S2. The quotient is stored
in the area specified by D and the remainder is stored in a special data register DT9015 (DT90015 for FP0
T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH).
Dividend data Quotient
(S1) (D)
÷
(S2)
Divisor Remainder
(DT9015/ DT90015)
....
With the FP0 T32,FP0R, FPΣ,FP−X, FP2, FP2SH, FP10SH and FP0 C10, C14, C16, C32/ FP−e, the
numbers of the special data registers are different.
Type Special data register
FP0 C10, C14, C16, C32/FP−e DT9015
FP0 T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH DT90015
Flag conditions
・Error flag (R9007): Turns on and stays on when:
・Error flag (R9008): Turns on for an instant when:
− The area specified using the index modifier exceeds the limit.
− The data is not BCD data.
− The 4-digit BCD equivalent constant or 4-digit BCD data for the divisor
(specified by S2) is 0.
・= flag (R900B): Turns on for an instant when the calculated result (quotient) is recognized as
“0”.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com