178
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 when the trigger turns ON.
The quotient is stored in D and the remainder is stored in the special data register DT9015.
■
Flag condition
• Error flag (R9007):
Turns ON and keeps the ON state,
- when the area specified using the index modifier exceeds the limit.
- when the 16-bit equivalent constant or 16-bit data for the divisor
specified by S2 is 0.
The error address is transferred to DT9017 and held. (See notes below.)
• Error flag (R9008):
Turns ON for an instant,
- when the area specified using the index modifier exceeds the limit.
- when the 16-bit equivalent constant or 16-bit data for the divisor
specified by S2 is 0.
The error address is transferred to DT9018. (See notes below.)
• = flag (R900B):
Turns ON for an instant when the calculated result is recognized as “0”.
• Carry flag (R9009):
Turns ON for an instant when negative minimum value K-32768
(H8000) is divided by K-1 (HFFFF).
Notes:
• Special data registers DT9017 and DT9018 are available only for FP1s with CPU
version 2.7 or later. (All FP1s with a suffix “B” on the part number have this function.)
• When using special internal relays R9008, R9009, and R900B as the flags for this
instruction, be sure to program the flags at the address immediately after the
instruction.
• Refer to page 223, “8-3. Table of Special Internal Relays”, for details about error
flags, = flag, and carry flag.
• If the calculated result accidently overflows (if special internal relay R9009 turns
ON), use of the
F33 (D%)
instruction (32-bit data division) is recommended. When
you use the
F33 (D%)
instruction instead of
F32 (%)
, be sure to convert the 16-bit
dividend and divisor into 32-bit data using the
F89 (EXT)
instruction.
Dividend data
Divisor
Trigger turns ON
Quotient
Remainder
S1
÷
S2
D ....
DT9015
6-3. Description of High-level Instructions
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 ...