Panasonic FP-E Programming Manual page 380

Fp series
Table of Contents

Advertisement

High−level Instructions
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)
Bit position
·
· ·
15
12
DT10
0 0 0
0
BCD H code
0
Divisor [S2]: H4 (BCD)
·
· ·
Bit position
15
12
DT20
0 0 0
0
BCD H code
0
Quotient [D]: H3 (BCD)
Bit position
·
· ·
15
12
DT30
0 0 0
0
BCD H code
0
Remainder: H3 (BCD)
Bit position
·
· ·
15
12
DT9015/DT90015
0 0 0
0
BCD H code
0
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
Divisor
(S1)
(S2)
÷
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
FP0 C10, C14, C16, C32/FP−e
FP0 T32/FP0R/FPΣ/FP−X/FP2/FP2SH/FP10SH
Flag conditions
・Error flag (R9007):
・Error flag (R9008):
・= flag (R900B):
3 − 116
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
·
·
·
·
11
8
7
4
3
0 0 0
0
0 0 0
1
0 1 0
0
1
·
·
·
·
11
8
7
4
3
0 0 0
0
0 0 0
0
0 1 0
0
0
X0: on
·
·
·
·
11
8
7
4
3
0 0 0
0
0 0 0
0
0 0 1
0
0
·
·
·
·
11
8
7
4
3
0 0 0
0
0 0 0
0
0 0 1
0
0
Quotient
Turns on and stays on when:
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.
Turns on for an instant when the calculated result (quotient) is recognized as
"0".
·
·
0
1
5
·
·
0
0
4
·
·
0
1
3
·
·
0
1
3
Remainder
(D)
(DT9015/ DT90015)
Special data register
DT9015
DT90015

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents