199
6-4. Hints for Programming High-level Instructions
3) Overflow and Underflow in BCD Operations (4-digit or 8-digit)
In BCD data, only positive numbers can be handled in the FP1.
■
4-digit BCD Operation
■
8-digit BCD Operation
Example:
• Overflow
When DT0 = H9999 and DT1 = H1 (BCD),
H0 (BCD) is stored in DT100 and R9009 turns ON.
• Underflow
When DT0 = H0 and DT1 = H-1,
H9999 is stored in DT100 and R9009 turns ON.
X0
F42 B+, DT0, DT1, DT100
Underflow
Overflow
H 99999999
H 0
The maximum
value links with
the minimum
value.
Max. value
Min. value
• Overflow:
The result becomes a minimum value
(H00000000) if K1 is added to the
maximum value (H99999999).
• Underflow:
The result becomes a maximum value
(H99999999) if K1 is subtracted from the
minimum value (H00000000).
Underflow
Overflow
H 9999
H 0
The maximum
value links with
the minimum
value.
Max. value
Min. value
• Overflow:
The result becomes a minimum value
(H0000) if K1 is added to the maximum
value (H9999).
• Underflow:
The result becomes a maximum value
(H9999) if K1 is subtracted from the
minimum value (H0000).
Summary of Contents for FP1
Page 1: ...PROGRAMMABLE CONTROLLER FP1 is a global brand name of Matsushita Electric Works Hardware ...
Page 28: ...20 ...
Page 98: ...90 ...
Page 150: ...142 ...
Page 208: ...200 ...
Page 226: ...218 ...
Page 280: ...272 ...