Panasonic FP-E Programming Manual page 332

Fp series
Table of Contents

Advertisement

High−level Instructions
Example 2: When the decimal number 3 is in DT20 and the decimal number
5 is in DT10.
D:
S:
D:
Description
Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D.
Minuend data
Subtrahend data
(D)
Precautions during programming
If the result of an arithmetic operation instruction does not fall within the range of values which can be
handled, an overflow or underflow will result.
Under normal circumstances, do not allow an overflow or underflow to occur.
If the calculated result accidentally overflows or underflows, use of the F26 (D−) instruction (32-bit data
subtraction) is recommended.
When you use the F26 (D−) instruction instead of F25 (−), be sure to convert the 16-bit subtrahend and
minuend into 32-bit data using the F89 (EXT) instruction.
If an overflow or underflow occurs, the carry flag (special internal relay R9009) will turn on.
Flag conditions
・Error flag (R9007):
・Error flag (R9008):
・= flag (R900B):
・Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
3 − 68
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
DT20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
(Subtraction)
DT10
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
DT20
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
(S)
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".
data (overflows or underflows).
K3
K5
=
K−2
Result
(D)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents