EasyManua.ls Logo

Panasonic FP-E - Page 332

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 − 68
Example 2: When the decimal number 3 is in DT20 and the decimal number
5 is in DT10.
000 0000000000011
DT20
000 0000000000101
DT10
D: K3
S:
−
K5
=
111 1111111111110
DT20
D:
K−2
(Subtraction)
Description
Subtracts the 16-bit equivalent constant or 16-bit area specified by S from the 16-bit area specified by D.
Minuend data Result
(D) (D)− (S)
Subtrahend data
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): Turns on and stays on when the area specified using the index modifier
exceeds the limit.
・Error flag (R9008): Turns on for an instant when the area specified using the index modifier
exceeds the limit.
・= flag (R900B): Turns on for an instant when the calculated result is recognized as “0”.
・Carry flag (R9009): Turns on for an instant when the calculated result exceeds the range of 16-bit
data (overflows or underflows).
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com