Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions API 120 Operands: S 1 : Augend S 2 : Addend D : Addition result Explanations: 1. S 1 + S 2 = D . The floating point value in S 1 and S 2 are added and the result is stored in D 2. F refers to floating point input. Be sure to add a decimal point when using it. 3. Only 32-bit instructions DEADD and DEADDP 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. S 1 and S 2 can designate the same register.

In this case, if the instruction is specified as “continuous execution instruction” (generally DEADDP instruction) and the drive contact is ON, the register will be added once in every scan. 6. Flags: 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 X0 = ON, add the binary floating point value (D1, D0) with binary floating point value (D3, D2) and store the result in (D11, D10). X0 D10 Program Example 2:

When X2 = ON, add the binary floating point value of (D11, D10) with F1234.0 (automatically converted to binary floating point value) and store the result in (D21, D20). X2 Points to note: For floating point operations, see “5.3 Numeric Values for Data Processing”. DVP-PM Application Manual 5-99 Mnemonic Operands Function Controllers 20PM 10PM D EADD P Binary Floating Point Addition 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 DEADD D0 D2 DEADD D10 F1234.0 D20