Panasonic FP-E Programming Manual page 344

Fp series
Table of Contents

Advertisement

High−level Instructions
Explanation of example
Divides the contents of data register DT10 by decimal constant 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.
When the decimal number 15 is in DT10 and the decimal number 4 is in DT20, as shown below.
Dividend [S1]: K15
Bit position
15
12
11
· · ·
0 0 0
0
0 0 0
DT10
Divisor [S2]: K4
Bit position
15
12
11
· · ·
DT20
0 0 0
0
0 0 0
Quotient [D]: K3
Bit position
15
12
11
· · ·
DT30
0 0 0
0
0 0 0
Description
The 16-bit data or 16-bit equivalent constant specified by S1 is divided by the 16-bit data or 16-bit equivalent
constant specified by S2.
The quotient is stored in D and the remainder is stored in the 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):
・Carry flag (R9009): Turns on for an instant when the negative minimum value K-32768 (H8000) is
3 − 80
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
8
7
4
3
0
·
·
· ·
· ·
0
0 0 0
0
1 1 1
1
8
7
4
3
0
·
·
· ·
· ·
0
0 0 0
0
0 1 0
0
8
7
4
3
0
·
·
· ·
· ·
0
0 0 0
0
0 0 1
1
Quotient
(D)
Special data register
DT9015
DT90015
Turns on and stays on when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the area specified using the index modifier
exceeds the limit.
Turns on for an instant when the calculated result is recognized as "0".
divided by K-1 (HFFFF).
Remainder: K3
Bit position
15
12
· · ·
DT9015/
. . .
0 0 0
0
DT90015
Remainder
. . . .
(DT9015/DT90015)
11
8
7
4 3
·
·
· ·
· ·
0 0 0
0
0 0 0
0
0 0 1
0
1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents