Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 123 Operands: S 1 : Dividend S 2 : Divisor D : Quotient and remainder Explanations: 1. S 1 ч S 2 = D . The floating point value in S 1 is divided by the floating point value in S 2 and the result is stored in D . The division is conducted in binary floating point format 2. F refers to floating point input. Be sure to add a decimal point when using it. 3. Only 32-bit instructions DEDIV and DEDIVP are applicable. 4. If S 1 or S 2 is specified with floating point value F, the instruction will operate in binary floating point. 5. If S 2 = 0, operation error will occur, the instruction will not be executed.

The operational error flag will be ON, and 6. Flags: the error code H’0E19 will be recorded. a) If the absolute value of the result exceeds the max floating point value, carry flag will be ON. b) If the absolute value of the result is less than min. floating point value, borrow flag will be ON. c) If the conversion result is 0, zero flag will be ON. Program Example 1: When X1 = ON, binary floating point value of (D1, D0) is divided by binary floating point (D11, D10) and the quotient and remainder is stored in (D21, D20). X1 Program Example 2:

When X2 = ON, binary floating point value of (D1, D0) is divided by F1234.0 (automatically converted to binary floating point value) and the result is stored in (D11, D10). X2 Points to note: For floating point operations, see “5.3 Numeric Values for Data Processing” . DVP-PM Operation Instruction 5-102 Mnemonic Operands Function Controllers 20PM 10PM D EDIV P Binary Floating Point Division Type OP Bit Devices Word Devices Program Steps X Y M S F H KnX KnY KnM KnS T C D V Z D S 1 * * S 2 * * D * OX O100 Zero flag M1808 M1968 Borrow flag M1809 M1969 Carry flag M1810 M1970 Operation error M1793 M1953 DEDIV D0 D10 D20 DEDIV D0 F1234.0 D10